diff --git a/module/bug/control.php b/module/bug/control.php index 1fea4f9807..98408efe60 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -565,8 +565,9 @@ class bug extends control } else { - $builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'noempty,noterminate,nodone,withbranch,noreleased'); - $stories = $this->story->getProductStoryPairs($productID, $branch, 0, 'all','id_desc', 0, 'full', 'story', false); + $moduleID = $moduleID ? $moduleID : 0; + $builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'noempty,noterminate,nodone,withbranch,noreleased'); + $stories = $this->story->getProductStoryPairs($productID, $branch, $moduleID, 'all','id_desc', 0, 'full', 'story', false); } $moduleOwner = $this->bug->getModuleOwner($moduleID, $productID);