diff --git a/module/bug/js/common.js b/module/bug/js/common.js index f0c1927b20..5f82fb6680 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -204,6 +204,7 @@ function loadProductModules(productID) branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; if(typeof(moduleID) == 'undefined') moduleID = 0; + if(config.currentMethod == 'edit') moduleID = $('#module').val(); link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + moduleID); $('#moduleIdBox').load(link, function() { @@ -626,7 +627,8 @@ function notice() */ function setBranchRelated(branchID, productID, num) { - moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=bug&branch=' + branchID + '&num=' + num); + var currentModuleID = config.currentMethod == 'batchedit' ? $('#modules' + num).val() : 0; + moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=bug&branch=' + branchID + '&num=' + num + '¤tModuleID=' + currentModuleID); $.get(moduleLink, function(modules) { if(!modules) modules = ''; diff --git a/module/story/js/batchedit.js b/module/story/js/batchedit.js index fd823b61f7..6847a40766 100644 --- a/module/story/js/batchedit.js +++ b/module/story/js/batchedit.js @@ -30,7 +30,8 @@ function loadBranches(product, branch, storyID) if(typeof(branch) == 'undefined') branch = 0; if(!branch) branch = 0; - moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + product + '&viewtype=story&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=' + storyID); + var currentModuleID = $('#modules' + storyID).val(); + moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + product + '&viewtype=story&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=' + storyID + '&needManage=false&extra=¤tModuleID=' + currentModuleID); $('#modules' + storyID).parent('td').load(moduleLink, function(){$('#modules' + storyID).chosen();}); planID = $('#plans' + storyID).val(); diff --git a/module/story/view/header.html.php b/module/story/view/header.html.php index ec1e52aed1..585c12bf58 100644 --- a/module/story/view/header.html.php +++ b/module/story/view/header.html.php @@ -1,5 +1,6 @@ +app->rawMethod);?>