diff --git a/module/bug/js/common.js b/module/bug/js/common.js index d5f578f1b6..ca984a9482 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -529,7 +529,8 @@ function loadProductBranches(productID, param) $('#branch_chosen').remove(); $('#branch').next('.picker').remove(); - var param = (typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) ? "productID=" + productID + "&oldBranch=0¶m=" + param + "&projectID=" + objectID : "productID=" + productID + "&oldBranch=0¶m=" + param; + var param = "productID=" + productID + "&oldBranch=0¶m=" + param; + param += (typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) ? "&projectID=" + objectID : ""; $.get(createLink('branch', 'ajaxGetBranches', param), function(data) { if(data) diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index 7f4a0b6383..42988041d1 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -50,7 +50,8 @@ function loadProductBranches(productID) var param = ''; if(page == 'create') param = 'active'; $('#branch').remove(); - var param = (typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) ? "productID=" + productID + "&oldBranch=0¶m=" + param + "&projectID=" + objectID : "productID=" + productID + "&oldBranch=0¶m=" + param; + var param = "productID=" + productID + "&oldBranch=0¶m=" + param; + param += (typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) ? "&projectID=" + objectID : ""; $.get(createLink('branch', 'ajaxGetBranches', param), function(data) { if(data)