* [perf story #69178] Adjust activate model.

This commit is contained in:
wangyidong
2024-11-08 10:12:02 +08:00
committed by 孙广明
parent d3962b3645
commit 6d6ffbeb64
4 changed files with 3 additions and 98 deletions
+2 -6
View File
@@ -62,12 +62,6 @@ class taskModel extends model
if($task->left != $oldTask->left) $this->loadModel('program')->refreshProjectStats($oldTask->project);
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
if($oldTask->isParent)
{
unset($task->left);
unset($task->id);
$this->taskTao->updateChildrenByParent($taskID, $task, 'Activated', $comment);
}
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
$this->updateKanbanCell($taskID, $drag, $oldTask->execution);
@@ -3299,6 +3293,8 @@ class taskModel extends model
$this->dao->update(TABLE_TASK)->set('parent')->eq('0')->set('isParent')->eq(0)->set('path')->eq(",{$parentID},")->where('id')->eq($parentID)->exec();
continue;
}
/* 只有子任务是进行中和已完成的时候才更新父任务的状态。*/
/* Update parent task status only child status is 'doing' or 'done'. */
if(!in_array($status, array('doing', 'done'))) continue;
if($parentTask->status == $status) continue;