From 6709d3d377fc8bd24fddaa4582209248454512b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 31 Aug 2012 14:31:08 +0200 Subject: [PATCH] Fix: moving date of task when moving date of project was not working --- htdocs/projet/class/project.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 60964a35aed..c68d1d6efac 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1204,17 +1204,18 @@ class Project extends CommonObject $this->error.=$task->error; } } - + //print "$this->date_start + $tasktoshiftdate->date_start - $old_project_dt_start";exit; + //Calcultate new task start date with difference between old proj start date and origin task start date if (!empty($tasktoshiftdate->date_start)) { - $task->date_start = $this->date_start + ($tasktoshiftdate->date_start - $old_project_dt_st); + $task->date_start = $this->date_start + ($tasktoshiftdate->date_start - $old_project_dt_start); } //Calcultate new task end date with difference between origin proj end date and origin task end date if (!empty($tasktoshiftdate->date_end)) { - $task->date_end = $this->date_start + ($tasktoshiftdate->date_end - $old_project_dt_st); + $task->date_end = $this->date_start + ($tasktoshiftdate->date_end - $old_project_dt_start); } if ($to_update)