* Finish task #36501.

This commit is contained in:
tianshujie98
2021-03-10 15:26:32 +08:00
parent e526c540c8
commit b4fe162555
14 changed files with 140 additions and 132 deletions
+3 -2
View File
@@ -2043,7 +2043,7 @@ class executionModel extends model
$data->order = ++$lastOrder;
$this->dao->insert(TABLE_PROJECTSTORY)->data($data)->exec();
$this->story->setStage($storyID);
$action = $executionID == $this->session->PRJ ? 'linked2prj' : 'linked2execution';
$action = $executionID == $this->session->PRJ ? 'linked2project' : 'linked2execution';
$this->action->create('story', $storyID, $action, '', $executionID);
}
}
@@ -2119,7 +2119,8 @@ class executionModel extends model
}
$this->loadModel('story')->setStage($storyID);
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromexecution', '', $executionID);
$objectType = $executionID == $this->session->PRJ ? unlinkedfromproject : unlinkedfromexecution;
$this->loadModel('action')->create('story', $storyID, $objectType, '', $executionID);
$tasks = $this->dao->select('id')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('execution')->eq($executionID)->andWhere('status')->in('wait,doing')->fetchPairs('id');
foreach($tasks as $taskID)