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;