From c470946d4e2ef8fe889245bcff3153fe5833388d Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 21 Mar 2022 14:08:52 +0800 Subject: [PATCH] fixbug #17317 --- module/projectrelease/control.php | 2 +- module/projectrelease/js/common.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 9f528a977d..0d729c5199 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -51,7 +51,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); + $this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active'); $this->view->branch = $branch; $this->view->project = $this->project->getByID($projectID); } diff --git a/module/projectrelease/js/common.js b/module/projectrelease/js/common.js index 28aa8ce628..fe5e21654d 100644 --- a/module/projectrelease/js/common.js +++ b/module/projectrelease/js/common.js @@ -27,7 +27,7 @@ function loadBranches(productID) { $('#branch').remove(); $('#branch_chosen').remove(); - $.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data) + $.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID + '&oldBranch=0¶ms=active'), function(data) { var $product = $('#product'); var $inputGroup = $product.closest('.input-group');