From d8a419798de2f355f91f02f74330fd3c8e3b2a3d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Aug 2022 14:47:40 +0800 Subject: [PATCH] * Fix bug #26728. --- module/execution/js/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 9d88292f43..70b25619db 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -141,9 +141,10 @@ function loadBranches(product) if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove(); var projectID = (typeof(systemMode) != 'undefined' && systemMode == 'new') ? $('#project').val() : 0; + if(typeof(projectID) == 'undefined') projectID = 0; var index = $inputgroup.find('select:first').attr('id').replace('products' , ''); - $.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=¶m=active&projectID=" + projectID + "&withMainBranch="), function(data) + $.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=¶m=active&projectID=" + projectID + "&withMainBranch=true"), function(data) { if(data) {