diff --git a/module/build/control.php b/module/build/control.php index 918fcf2d6e..d1d4ffbcf2 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -16,6 +16,7 @@ class build extends control * * @param int $executionID * @param int $productID + * @param int $projectID * @access public * @return void */ @@ -72,7 +73,7 @@ class build extends control $productGroups = $this->loadModel('product')->getProducts($executionID); $productID = $productID ? $productID : key($productGroups); $branchGroups = $this->loadModel('project')->getBranchesByProject($executionID); - $branchPairs = $this->loadModel('branch')->getPairs($productID); + $branchPairs = $this->loadModel('branch')->getPairs($productID, 'active'); $branches = array(); $products = array(); @@ -81,7 +82,7 @@ class build extends control { foreach($branchGroups[$productID] as $branchID => $branch) { - $branches[$branchID] = $branchPairs[$branchID]; + if(isset($branchPairs[$branchID])) $branches[$branchID] = $branchPairs[$branchID]; } } diff --git a/module/build/js/common.js b/module/build/js/common.js index 71897d5bdc..e92d9470ad 100644 --- a/module/build/js/common.js +++ b/module/build/js/common.js @@ -16,7 +16,7 @@ function loadBranches(productID) } executionID = $('#execution').val(); - $.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=0¶m=&projectID=' + executionID), function(data) + $.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=0¶m=active&projectID=' + executionID), function(data) { if(data) {