* Fix bug.

This commit is contained in:
tianshujie98
2020-10-22 10:29:37 +08:00
parent 777956a658
commit 3a75e4a436
+5 -1
View File
@@ -372,10 +372,14 @@ class taskModel extends model
/* When common task are child tasks and the common task has consumption, create a child task. */
if($oldParentTask->parent == 0 and $oldParentTask->consumed > 0)
{
$clonedTask = $oldParentTask;
$clonedTask = clone $oldParentTask;
unset($clonedTask->id);
$clonedTask->parent = $parentID;
$this->dao->insert(TABLE_TASK)->data($clonedTask)->autoCheck()->exec();
/* Update task estimate log. */
$clonedTaskID = $this->dao->lastInsertID();
$this->dao->update(TABLE_TASKESTIMATE)->set('task')->eq($clonedTaskID)->where('task')->eq($oldParentTask->id)->exec();
}
$this->updateParentStatus($taskID);