* Finish task #6451.

This commit is contained in:
Yagami
2019-10-12 10:09:27 +08:00
parent c0497a7935
commit 727c6f4fce
+2 -2
View File
@@ -1480,6 +1480,7 @@ class taskModel extends model
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
if($oldTask->parent == '-1') $this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('parent')->eq((int)$taskID)->exec();
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
@@ -1537,6 +1538,7 @@ class taskModel extends model
->exec();
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
if($oldTask->parent == '-1') $this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('parent')->eq((int)$taskID)->exec();
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
@@ -2549,9 +2551,7 @@ class taskModel extends model
if($action == 'start' and !empty($task->children)) return false;
if($action == 'finish' and !empty($task->children)) return false;
if($action == 'cancel' and !empty($task->children)) return false;
if($action == 'pause' and !empty($task->children)) return false;
if($action == 'activate' and !empty($task->children)) return false;
if($action == 'assignto' and !empty($task->children)) return false;
if($action == 'close' and !empty($task->children)) return false;
if($action == 'batchcreate' and !empty($task->team)) return false;