* computeWorkingHours has in updateParentStatus method.
This commit is contained in:
@@ -782,7 +782,6 @@ class taskModel extends model
|
||||
if($oldTask->parent > 0)
|
||||
{
|
||||
$oldParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($oldTask->parent)->fetch();
|
||||
if($task->parent == 0) $this->computeWorkingHours($oldTask->parent);
|
||||
$this->updateParentStatus($taskID, $oldTask->parent, !$changed);
|
||||
$this->computeBeginAndEnd($oldTask->parent);
|
||||
|
||||
@@ -792,8 +791,11 @@ class taskModel extends model
|
||||
if(!$oldChildCount) $this->dao->update(TABLE_TASK)->set('parent')->eq(0)->where('id')->eq($oldTask->parent)->exec();
|
||||
$this->dao->update(TABLE_TASK)->set('lastEditedBy')->eq($this->app->user->account)->set('lastEditedDate')->eq(helper::now())->where('id')->eq($oldTask->parent)->exec();
|
||||
$this->action->create('task', $taskID, 'unlinkParentTask', '', $oldTask->parent);
|
||||
|
||||
$actionID = $this->action->create('task', $oldTask->parent, 'unLinkChildrenTask', '', $taskID);
|
||||
|
||||
$newParentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($oldTask->parent)->fetch();
|
||||
|
||||
$changes = common::createChanges($oldParentTask, $newParentTask);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user