From ed4dec3540a891c08c57fb66c4a71d6ab9018753 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 15 Aug 2022 15:32:13 +0800 Subject: [PATCH] * Fix bug #26445. --- module/build/control.php | 2 +- module/projectrelease/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index 2989c210ea..9dc99dcb18 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -252,7 +252,7 @@ class build extends control ->page($storyPager) ->fetchAll('id'); - $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage'); + $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in(array_keys($stories))->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage'); foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage; diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 43118269bc..572b0b934a 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -238,7 +238,7 @@ class projectrelease extends control ->page($storyPager) ->fetchAll('id'); - $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage'); + $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in(array_keys($stories))->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage'); foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;