From 06c7e015bb5502dafc029e0a7bcf2a6bd6f52b17 Mon Sep 17 00:00:00 2001 From: Can Arslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:38:26 -0700 Subject: [PATCH] FIX: Undefined property: Task::$fk_parent --- htdocs/projet/ganttview.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 145152d0089..dcf43bcdd1e 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -282,7 +282,7 @@ if (count($tasksarray) > 0) { foreach ($tasksarray as $key => $val) { // Task array are sorted by "project, position, date" $task->fetch($val->id, ''); - $idparent = ($val->fk_parent ? $val->fk_parent : '-'.$val->fk_project); // If start with -, id is a project id + $idparent = ($val->fk_task_parent ? $val->fk_task_parent : '-'.$val->fk_project); // If start with -, id is a project id $tasks[$taskcursor]['task_id'] = $val->id; $tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (required by ganttchart) @@ -294,7 +294,7 @@ if (count($tasksarray) > 0) { $tasks[$taskcursor]['task_position'] = $val->rang; $tasks[$taskcursor]['task_planned_workload'] = $val->planned_workload; - if ($val->fk_parent != 0 && $task->hasChildren() > 0) { + if ($val->fk_task_parent != 0 && $task->hasChildren() > 0) { $tasks[$taskcursor]['task_is_group'] = 1; $tasks[$taskcursor]['task_css'] = 'ggroupblack'; //$tasks[$taskcursor]['task_css'] = 'gtaskblue';