From 3445fe7f158c48088d848ebd4c7f5c0e897f84be Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 16 Jan 2024 13:30:12 +0800 Subject: [PATCH] bug: refactor autoLoad setting. --- module/bug/ui/create.html.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/module/bug/ui/create.html.php b/module/bug/ui/create.html.php index 12e751f0b8..31800bb7f1 100644 --- a/module/bug/ui/create.html.php +++ b/module/bug/ui/create.html.php @@ -15,6 +15,13 @@ $fields = useFields('bug.create'); if(!empty($executionType) && $executionType == 'kanban') $fields->merge('bug.kanban'); +$fields->autoLoad('product', 'product,module,openedBuild,execution,project,story,task,assignedTo') + ->autoLoad('branch', 'module,openedBuild,execution,project,story,task,assignedTo') + ->autoLoad('module', 'assignedTo,story') + ->autoLoad('project', 'openedBuild,execution,story,task,assignedTo') + ->autoLoad('execution', 'openedBuild,story,task,assignedTo') + ->autoLoad('region', 'lane'); + jsVar('bug', $bug); jsVar('moduleID', $bug->moduleID); jsVar('tab', $this->app->tab); @@ -22,14 +29,6 @@ jsVar('createRelease', $lang->release->create); jsVar('refresh', $lang->refreshIcon); jsVar('projectExecutionPairs', $projectExecutionPairs); -$autoLoad = array(); -$autoLoad['product'] = 'product,module,openedBuild,execution,project,story,task,assignedTo'; -$autoLoad['branch'] = 'module,openedBuild,execution,project,story,task,assignedTo'; -$autoLoad['module'] = 'assignedTo,story'; -$autoLoad['project'] = 'openedBuild,execution,story,task,assignedTo'; -$autoLoad['execution'] = 'openedBuild,story,task,assignedTo'; -$autoLoad['region'] = 'lane'; - formGridPanel ( set::title($lang->bug->create),