diff --git a/module/task/model.php b/module/task/model.php index 2d493b3f58..1363d1684f 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -173,11 +173,11 @@ class taskModel extends model $childTaskID = $this->dao->lastInsertID(); $this->action->create('task', $childTaskID, 'Opened'); } - } - $this->computeWorkingHours($taskID); - $this->computeBeginAndEnd($taskID); - $this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($taskID)->exec(); + $this->computeWorkingHours($taskID); + $this->computeBeginAndEnd($taskID); + $this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($taskID)->exec(); + } } $this->file->updateObjectID($this->post->uid, $taskID, 'task'); if(!empty($taskFiles))