diff --git a/module/bug/config/form.php b/module/bug/config/form.php index 46a3d53d20..12057be640 100644 --- a/module/bug/config/form.php +++ b/module/bug/config/form.php @@ -10,6 +10,7 @@ $config->bug->form->create['openedBuild'] = array('required' => true, 'type' => $config->bug->form->create['product'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->create['branch'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->create['module'] = array('required' => false, 'type' => 'int', 'default' => 0); +$config->bug->form->create['plan'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->create['project'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->create['execution'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->create['assignedTo'] = array('required' => false, 'type' => 'string', 'default' => ''); diff --git a/module/bug/ui/common.field.php b/module/bug/ui/common.field.php index 548b4facec..eeca182665 100644 --- a/module/bug/ui/common.field.php +++ b/module/bug/ui/common.field.php @@ -27,6 +27,10 @@ $fields->field('module') ->items(data('moduleOptionMenu')) ->value(data('bug.moduleID')); +$fields->field('plan') + ->control('picker') + ->items(data('plans')); + $fields->field('openedBuild') ->checkbox(array('text' => $lang->bug->allBugs, 'name' => 'allBuilds', 'checked' => data('allBuilds') ? true : false)) ->control('inputGroup') diff --git a/module/bug/ui/create.field.php b/module/bug/ui/create.field.php index 4e2cc0f7e1..c357795b7d 100644 --- a/module/bug/ui/create.field.php +++ b/module/bug/ui/create.field.php @@ -27,6 +27,11 @@ $fields->field('execution') ->className($isShadowProduct && $isOriginalProduct ? 'full:w-1/2' : 'full:w-1/4') ->foldable(!$isShadowProduct); +$fields->field('plan') + ->label($lang->bug->plan) + ->className('w-1/2 full:w-1/2') + ->foldable(!$isShadowProduct); + if(common::hasPriv('build', 'create')) { $fields->field('openedBuild') diff --git a/module/bug/ui/create.html.php b/module/bug/ui/create.html.php index 68150fa7a0..a67df19f44 100644 --- a/module/bug/ui/create.html.php +++ b/module/bug/ui/create.html.php @@ -24,7 +24,7 @@ $fields->autoLoad('branch', 'module,execution,project,story,task,assignedTo') ->autoLoad('allUsers', 'assignedTo') ->autoLoad('region', 'lane'); -if(!$product->shadow) $fields->fullModeOrders('module,project,execution'); +if(!$product->shadow) $fields->fullModeOrders('module,project,execution,plan'); jsVar('bug', $bug); jsVar('moduleID', $bug->moduleID); diff --git a/module/bug/zen.php b/module/bug/zen.php index be4ab4ec70..e9656ec5c7 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1104,6 +1104,7 @@ class bugZen extends bug $this->view->branchID = $bug->branch != 'all' ? $bug->branch : '0'; $this->view->cases = $this->loadModel('testcase')->getPairsByProduct($this->session->product, array(0, $this->view->branchID)); $this->view->copyBugID = isset($bugID) ? $bugID : 0; + $this->view->plans = $this->loadModel('productplan')->getPairs($bug->productID, $bug->branch, '', true); } /**