diff --git a/module/bug/control.php b/module/bug/control.php index 87432af5c1..8afc84a762 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -181,9 +181,6 @@ class bug extends control /* Process bug for check story changed. */ $bugs = $this->loadModel('story')->checkNeedConfirm($bugs); - /* Process the openedBuild and resolvedBuild fields. */ - $bugs = $this->bug->processBuildForBugs($bugs); - /* Get story and task id list. */ $storyIdList = $taskIdList = array(); foreach($bugs as $bug) @@ -1466,7 +1463,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..3d7fa64eda 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1375,36 +1375,6 @@ class bugModel extends model $this->loadModel('search')->setSearchParams($this->config->bug->search); } - /** - * Process the openedBuild and resolvedBuild fields for bugs. - * - * @param array $bugs - * @access public - * @return array - */ - public function processBuildForBugs($bugs) - { - $productIdList = array(); - foreach($bugs as $bug) $productIdList[$bug->id] = $bug->product; - $builds = $this->loadModel('build')->getBuildPairs(array_unique($productIdList), 0, $params = ''); - - /* Process the openedBuild and resolvedBuild fields. */ - foreach($bugs as $key => $bug) - { - $openBuildIdList = explode(',', $bug->openedBuild); - $openedBuild = ''; - foreach($openBuildIdList as $buildID) - { - $openedBuild .= isset($builds[$buildID]) ? $builds[$buildID] : $buildID; - $openedBuild .= ','; - } - $bug->openedBuild = rtrim($openedBuild, ','); - $bug->resolvedBuild = isset($builds[$bug->resolvedBuild]) ? $builds[$bug->resolvedBuild] : $bug->resolvedBuild; - } - - return $bugs; - } - /** * Extract accounts from some bugs. *