diff --git a/module/bug/js/batchedit.ui.js b/module/bug/js/batchedit.ui.js index 1af18ea7a9..7cc053b693 100644 --- a/module/bug/js/batchedit.ui.js +++ b/module/bug/js/batchedit.ui.js @@ -155,3 +155,28 @@ function setDuplicate(event) $currentRow.find('[data-name="duplicateBug"]').toggleClass('hidden', resolution != 'duplicate'); } + +function projectChange(event) +{ + const $row = $(event.target).closest('tr'); + const projectID = $(event.target).val(); + + $row.find('input[name^="execution"]').zui('picker').render({disabled: typeof(noSprintProjects[projectID]) != 'undefined'}); + if(typeof(noProductProjects[projectID]) != 'undefined') + { + const productIDLink = $.createLink('bug', 'ajaxGetProductIDByProject', 'projectID=' + projectID); + $.get(productIDLink, function(id) + { + $row.find('[name^=product]').val(id); + loadExecutions($row, id, projectID); + loadProductModules($row, id) + loadProductPlans($row, id); + loadProductBugs($row, id); + }); + } + else + { + const productID = $row.find('[name^=product]').val(); + loadExecutions($row, productID, projectID); + } +}