Fix: moving date of task when moving date of project was not working
This commit is contained in:
parent
27846d1698
commit
6709d3d377
@ -1204,17 +1204,18 @@ class Project extends CommonObject
|
|||||||
$this->error.=$task->error;
|
$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
|
//Calcultate new task start date with difference between old proj start date and origin task start date
|
||||||
if (!empty($tasktoshiftdate->date_start))
|
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
|
//Calcultate new task end date with difference between origin proj end date and origin task end date
|
||||||
if (!empty($tasktoshiftdate->date_end))
|
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)
|
if ($to_update)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user