From e427e235fa89dfb58958d16a6ab44b59b06d9a28 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 18 Jan 2022 08:45:58 +0800 Subject: [PATCH] * Modify the code logic. --- module/story/model.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 9ef1861ee5..c7047949a6 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2019,7 +2019,7 @@ class storyModel extends model foreach($executions as $execution => $branch) { $this->dao->replace(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq('closed')->exec(); - $this->kanban->updateLane($execution, 'story'); + $this->kanban->updateLane($execution, 'story', $storyID); } return false; } @@ -2176,13 +2176,7 @@ class storyModel extends model $currentStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); if($story->stage != $currentStory->stage) { - $executionIdList = $this->dao->select('t1.id')->from(TABLE_PROJECT)->alias('t1') - ->leftJoin(TABLE_PROJECTSTORY)->alias('t2')->on('t1.id=t2.project') - ->where('t1.deleted')->eq(0) - ->andWhere('t1.type')->in('sprint,stage,kanban') - ->andWhere('t2.story')->eq($storyID) - ->fetchPairs(); - foreach($executionIdList as $executionID) + foreach($executions as $executionID => $branch) { $this->kanban->updateLane($executionID, 'story', $storyID); }