From 727c6f4fce2a4c4628c84ebec588b4124060b4f7 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Sat, 12 Oct 2019 10:09:27 +0800 Subject: [PATCH] * Finish task #6451. --- module/task/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 1ae5daec92..0ee7e9035f 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -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;