* Finish task #116677.

This commit is contained in:
sunguangming
2024-04-18 14:26:13 +08:00
parent 5731636e95
commit 62b519574b
+4 -1
View File
@@ -2804,11 +2804,13 @@ class executionModel extends model
$versions = $this->loadModel('story')->getVersions($stories);
$linkedStories = $this->dao->select('story,`order`')->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->orderBy('order_desc')->fetchPairs('story', 'order');
$lastOrder = (int)reset($linkedStories);
$storyList = $this->dao->select('id, status, branch, product')->from(TABLE_STORY)->where('id')->in(array_values($stories))->fetchAll('id');
$storyList = $this->dao->select('id, status, branch, product, type')->from(TABLE_STORY)->where('id')->in(array_values($stories))->fetchAll('id');
$execution = $this->fetchByID($executionID);
$notAllowedStatus = $this->app->rawMethod == 'batchcreate' ? 'closed' : 'draft,reviewing,closed';
$laneID = isset($output['laneID']) ? $output['laneID'] : 0;
$project = $execution->type == 'project' ? $execution : $this->loadModel('project')->fetchById($execution->project);
foreach($stories as $storyID)
{
if(isset($linkedStories[$storyID])) continue;
@@ -2817,6 +2819,7 @@ class executionModel extends model
$storyID = (int)$storyID;
$story = zget($storyList, $storyID, '');
if(empty($story)) continue;
if(strpos($project->storyType, "$story->type") === false) continue;
if(!empty($lanes[$storyID])) $laneID = $lanes[$storyID];
$columnID = $this->kanban->getColumnIDByLaneID((int)$laneID, 'backlog');