diff --git a/module/bug/ui/common.field.php b/module/bug/ui/common.field.php index 6e77e23f4f..2303a80881 100644 --- a/module/bug/ui/common.field.php +++ b/module/bug/ui/common.field.php @@ -5,12 +5,22 @@ global $lang; $fields = defineFieldList('bug'); $fields->field('product') - ->hidden(data('product.shadow')) ->control('inputGroup') ->items(false) ->itemBegin('product')->control('picker')->items(data('products'))->value(data('bug.productID'))->itemEnd() ->item((data('product.type') !== 'normal' && isset(data('products')[data('bug.productID')])) ? field('branch')->control('picker')->boxClass('flex-none')->width('100px')->name('branch')->items(data('branches'))->value(data('bug.branch')) : null); +$fields->field('project') + ->control('picker') + ->items(data('projects')) + ->value(data('projectID')); + +$fields->field('execution') + ->id('executionBox') + ->control('picker') + ->items(data('executions')) + ->value(data('executionID')); + $fields->field('module') ->control(array('control' => 'modulePicker', 'manageLink' => createLink('tree', 'browse', 'rootID=' . data('bug.productID') . '&view=bug¤tModuleID=0&branch=' . data('bug.branch')))) ->items(data('moduleOptionMenu')) @@ -72,61 +82,38 @@ $fields->field('files') ->width('full') ->control('files'); -$fields->field('project') - ->foldable() - ->control('picker') - ->items(data('projects')) - ->value(data('projectID')); - -$fields->field('execution') - ->hidden(data('execution') && !data('execution.multiple')) - ->id('executionBox') - ->foldable() - ->label(data('bug.projectModel') === 'kanban' ? $lang->bug->kanban : $lang->bug->execution) - ->control('picker') - ->items(data('executions')) - ->value(data('executionID')); - $fields->field('story') ->wrapBefore() - ->foldable() ->control('picker') ->items(empty(data('bug.stories')) ? array() : data('bug.stories')) ->value(data('bug.storyID')); $fields->field('task') - ->foldable() ->control('picker') ->items(array()) ->value(data('bug.taskID')); $fields->field('feedbackBy') - ->foldable() ->control('input'); $fields->field('notifyEmail') - ->foldable() ->control('input'); $fields->field('browser') - ->foldable() ->control('picker') ->items($lang->bug->browserList) ->multiple(); $fields->field('os') - ->foldable() ->control('picker') ->items($lang->bug->osList) ->multiple(); $fields->field('mailto') - ->foldable() ->control('mailto') ->value(data('bug.mailto')); $fields->field('keywords') - ->foldable() ->control('input'); $fields->field('case')->control('hidden')->value(data('bug.caseID')); diff --git a/module/bug/ui/create.field.php b/module/bug/ui/create.field.php index 4114e2b0a7..edf5d36edc 100644 --- a/module/bug/ui/create.field.php +++ b/module/bug/ui/create.field.php @@ -1,10 +1,42 @@ tab == 'qa'; $fields = defineFieldList('bug.create', 'bug'); -$fields->field('module')->width('1/4'); +$fields->field('product')->hidden($isShadowProduct && !$inQaApp); -$fields->field('openedBuild')->width('1/4'); +$fields->field('project')->foldable(!$isShadowProduct)->className($isShadowProduct && $inQaApp ? 'w-1/4' : 'w-1/2')->className('full:w-1/4'); + +$fields->field('execution') + ->label(data('bug.projectModel') === 'kanban' ? $lang->bug->kanban : $lang->bug->execution) + ->hidden(data('execution') && !data('execution.multiple')) + ->className($isShadowProduct && $inQaApp ? 'w-1/4' : 'w-1/2') + ->className('full:w-1/4') + ->foldable(!$isShadowProduct); + +$fields->field('story')->foldable(); + +$fields->field('task')->foldable(); + +$fields->field('feedbackBy')->foldable(); + +$fields->field('notifyEmail')->foldable(); + +$fields->field('browser')->foldable(); + +$fields->field('os')->foldable(); + +$fields->field('mailto')->foldable(); + +$fields->field('keywords')->foldable(); + +$fields->field('module')->className($isShadowProduct ? 'w-1/2' : 'w-1/4')->className('full:w-1/2'); + +$fields->field('openedBuild')->className($isShadowProduct ? 'w-1/2' : 'w-1/4')->className('full:w-1/2'); + +if($isShadowProduct && $inQaApp) $fields->moveAfter('module', 'product'); diff --git a/module/bug/ui/create.html.php b/module/bug/ui/create.html.php index 2c16beada0..03729d6649 100644 --- a/module/bug/ui/create.html.php +++ b/module/bug/ui/create.html.php @@ -33,6 +33,7 @@ formGridPanel ( set::title($lang->bug->create), set::fields($fields), + set::fullModeOrders('module,project,execution'), set::loadUrl($loadUrl), on::click('#allBuilds', 'loadAllBuilds'), on::click('#allUsers', 'loadAllUsers'),