* [refac bug #56328] reload page when change product in bug-create page.

This commit is contained in:
wangyidong
2024-10-22 11:20:34 +08:00
committed by 孙广明
parent c4e2d4a9e0
commit 63ffed4f59
2 changed files with 9 additions and 3 deletions
+4
View File
@@ -0,0 +1,4 @@
window.reloadByProduct = function(e)
{
loadPage($.createLink('bug', 'create', 'productID=' + $(e.target).val() + '&branch=0&extra=projectID=' + projectID + ',executionID=' + executionID));
}
+5 -3
View File
@@ -16,8 +16,7 @@ include($this->app->getModuleRoot() . 'ai/ui/inputinject.html.php');
$fields = useFields('bug.create');
if(!empty($executionType) && $executionType == 'kanban') $fields->merge('bug.kanban');
$fields->autoLoad('product', array('items' => 'product,module,execution,project,story,task,assignedTo', 'updateOrders' => true))
->autoLoad('branch', 'module,execution,project,story,task,assignedTo')
$fields->autoLoad('branch', 'module,execution,project,story,task,assignedTo')
->autoLoad('module', 'assignedTo,story')
->autoLoad('project', 'project,execution,story,task,assignedTo,injection,identify')
->autoLoad('execution', 'execution,story,task,assignedTo')
@@ -30,6 +29,8 @@ if(!$product->shadow) $fields->fullModeOrders('module,project,execution');
jsVar('bug', $bug);
jsVar('moduleID', $bug->moduleID);
jsVar('methodName', $app->methodName);
jsVar('projectID', isset($projectID) ? $projectID : 0);
jsVar('executionID', isset($executionID) ? $executionID : 0);
jsVar('tab', $this->app->tab);
jsVar('createRelease', $lang->release->create);
jsVar('refresh', $lang->refreshIcon);
@@ -37,7 +38,8 @@ jsVar('projectExecutionPairs', $projectExecutionPairs);
formGridPanel
(
on::change('[name="product"], [name="branch"], [name="project"], [name="execution"]', 'loadBuilds'),
on::change('[name="product"]', 'reloadByProduct'),
on::change('[name="branch"], [name="project"], [name="execution"]', 'loadBuilds'),
set::title($lang->bug->create),
set::fields($fields),
set::loadUrl($loadUrl)