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;