diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index a16c1aa687..616a6acfbf 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -49,7 +49,7 @@ class projectrelease extends control $this->view->products = $this->products; $this->view->product = $product; - $this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active'); + $this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active', $projectID); $this->view->branch = $branch; $this->view->project = $this->project->getByID($projectID); } diff --git a/module/projectrelease/js/create.js b/module/projectrelease/js/create.js index 36e9089d4b..e04f96c37c 100644 --- a/module/projectrelease/js/create.js +++ b/module/projectrelease/js/create.js @@ -45,9 +45,10 @@ function loadBranches(productID) if(data) { $inputGroup.append(data); + $inputGroup.find('#branch').attr('onchange', 'loadBuilds()'); $('#branch').css('width', '120px').chosen(); - loadBuilds(); } + loadBuilds(); $inputGroup.fixInputGroup(); }) } diff --git a/module/projectrelease/view/create.html.php b/module/projectrelease/view/create.html.php index 8477a26cfd..ea809f9afe 100644 --- a/module/projectrelease/view/create.html.php +++ b/module/projectrelease/view/create.html.php @@ -38,7 +38,7 @@
id, "onchange='loadBranches(this.value)' class='form-control chosen'");?> - type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch' onchange='loadBuilds()'");?> + type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch'");?>