From 298c55b3edd9a724e4738b5be9791dc798eb4c47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Jul 2016 16:22:16 +0200 Subject: [PATCH] Fix bad property set. Must set fk_task_parent not fk_parent. --- htdocs/projet/class/task.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 6db12174539..42260a9b66f 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -679,7 +679,8 @@ class Task extends CommonObject $tasks[$i]->projectstatus = $obj->projectstatus; $tasks[$i]->label = $obj->label; $tasks[$i]->description = $obj->description; - $tasks[$i]->fk_parent = $obj->fk_task_parent; + $tasks[$i]->fk_parent = $obj->fk_task_parent; // deprecated + $tasks[$i]->fk_task_parent = $obj->fk_task_parent; $tasks[$i]->duration = $obj->duration_effective; $tasks[$i]->planned_workload= $obj->planned_workload; $tasks[$i]->progress = $obj->progress; @@ -913,14 +914,18 @@ class Task extends CommonObject /** * Calculate total of time spent for task * - * @param int $id Id of object (here task) * @return array Array of info for task array('min_date', 'max_date', 'total_duration') */ - function getSummaryOfTimeSpent($id='') + function getSummaryOfTimeSpent() { global $langs; - if (empty($id)) $id=$this->id; + $id=$this->id; + if (empty($id)) + { + dol_syslog("getSummaryOfTimeSpent called on a not loaded task", LOG_ERR); + return -1; + } $result=array();