diff --git a/module/bug/control.php b/module/bug/control.php index 87432af5c1..bbeb913ca5 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1466,7 +1466,7 @@ class bug extends control $this->view->users = $users; $this->view->assignedTo = $assignedTo; $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); - $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'withbranch'); + $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch'); $this->view->actions = $this->action->getList('bug', $bugID); $this->display(); } diff --git a/module/bug/model.php b/module/bug/model.php index 246ebaedda..f1518ab47e 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1386,7 +1386,7 @@ class bugModel extends model { $productIdList = array(); foreach($bugs as $bug) $productIdList[$bug->id] = $bug->product; - $builds = $this->loadModel('build')->getBuildPairs(array_unique($productIdList), 0, $params = ''); + $builds = $this->loadModel('build')->getBuildPairs(array_unique($productIdList), 'all', $params = ''); /* Process the openedBuild and resolvedBuild fields. */ foreach($bugs as $key => $bug) @@ -1401,7 +1401,6 @@ class bugModel extends model $bug->openedBuild = rtrim($openedBuild, ','); $bug->resolvedBuild = isset($builds[$bug->resolvedBuild]) ? $builds[$bug->resolvedBuild] : $bug->resolvedBuild; } - return $bugs; }