diff --git a/module/bug/config.php b/module/bug/config.php index f8caed6827..034f396f3b 100755 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -34,14 +34,14 @@ $config->bug->list->allFields = 'id, module, execution, story, task, $config->bug->list->defaultFields = 'id,title,severity,pri,openedBy,assignedTo,resolvedBy,resolution'; $config->bug->list->customCreateFields = 'execution,noticefeedbackBy,story,task,pri,severity,os,browser,deadline,mailto,keywords'; $config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,resolvedBy,resolution,os,browser,keywords'; -$config->bug->list->customBatchCreateFields = 'project,execution,steps,type,pri,deadline,severity,os,browser,keywords'; +$config->bug->list->customBatchCreateFields = 'project,execution,plan,steps,type,pri,deadline,severity,os,browser,keywords'; $config->bug->custom = new stdclass(); $config->bug->custom->createFields = $config->bug->list->customCreateFields; $config->bug->custom->batchCreateFields = 'project,execution,deadline,steps,type,pri,severity,os,browser,%s'; $config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution'; -$config->bug->exportFields = 'id, product, branch, module, project, execution, story, task, +$config->bug->exportFields = 'id, product, branch, module, project, execution, plan, story, task, title, keywords, severity, pri, type, os, browser, steps, status, deadline, activatedCount, confirmed, mailto, openedBy, openedDate, openedBuild, diff --git a/module/bug/config/form.php b/module/bug/config/form.php index 9736e3f52d..46a3d53d20 100644 --- a/module/bug/config/form.php +++ b/module/bug/config/form.php @@ -159,6 +159,7 @@ $config->bug->form->batchCreate['story'] = array('required' => false, 'typ $config->bug->form->batchCreate['branch'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->batchCreate['laneID'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->batchCreate['openedBuild'] = array('required' => true, 'type' => 'array', 'default' => '', 'filter' => 'join'); +$config->bug->form->batchCreate['plan'] = array('required' => false, 'type' => 'int', 'default' => 0); $config->bug->form->batchCreate['title'] = array('required' => true, 'type' => 'string', 'default' => '', 'base' => true); $config->bug->form->batchCreate['deadline'] = array('required' => false, 'type' => 'date', 'default' => null); $config->bug->form->batchCreate['steps'] = array('required' => false, 'type' => 'string', 'default' => '', 'control' => 'editor'); diff --git a/module/bug/config/table.php b/module/bug/config/table.php index c6116e204b..71e2e80571 100644 --- a/module/bug/config/table.php +++ b/module/bug/config/table.php @@ -70,11 +70,12 @@ $config->bug->dtable->fieldList['execution']['group'] = 3; $config->bug->dtable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' =>'getPairs', 'params' => ['projectID' => 0]); $config->bug->dtable->fieldList['execution']['sortType'] = true; -$config->bug->dtable->fieldList['plan']['title'] = $lang->bug->plan; -$config->bug->dtable->fieldList['plan']['width'] = 120; -$config->bug->dtable->fieldList['plan']['group'] = 3; -$config->bug->dtable->fieldList['plan']['sortType'] = true; -$config->bug->dtable->fieldList['plan']['hint'] = true; +$config->bug->dtable->fieldList['plan']['title'] = $lang->bug->plan; +$config->bug->dtable->fieldList['plan']['width'] = 120; +$config->bug->dtable->fieldList['plan']['group'] = 3; +$config->bug->dtable->fieldList['plan']['sortType'] = true; +$config->bug->dtable->fieldList['plan']['hint'] = true; +$config->bug->dtable->fieldList['plan']['dataSource'] = array('module' => 'productplan', 'method' =>'getPairs', 'params' => ['productIdList' => '$productID', 'branch' => '$branch']); $config->bug->dtable->fieldList['openedBuild']['title'] = $lang->bug->openedBuild; $config->bug->dtable->fieldList['openedBuild']['type'] = 'text'; diff --git a/module/bug/ui/batchcreate.html.php b/module/bug/ui/batchcreate.html.php index 1906819900..a3ef537606 100644 --- a/module/bug/ui/batchcreate.html.php +++ b/module/bug/ui/batchcreate.html.php @@ -64,6 +64,9 @@ $items[] = array /* Field of openedBuild. */ $items[] = array('name' => 'openedBuild', 'label' => $lang->bug->openedBuild, 'control' => 'picker', 'items' => $builds, 'value' => 'trunk', 'multiple' => true, 'width' => '200px', 'required' => true, 'ditto' => true); +/* Field of plan. */ +$items[] = array('name' => 'plan', 'label' => $lang->bug->plan, 'control' => 'picker', 'items' => $plans, 'value' => '', 'width' => '200px', 'required' => isset($requiredFields['plan']), 'ditto' => true); + /* Field of title. */ $items[] = array( 'name' => 'title', 'label' => $lang->bug->title, 'width' => '240px', 'required' => true, 'control' => 'colorInput'); diff --git a/module/bug/zen.php b/module/bug/zen.php index e388eaa3a0..be4ab4ec70 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1401,6 +1401,7 @@ class bugZen extends bug $this->view->branch = $branch; $this->view->branches = $branches; $this->view->moduleOptionMenu = $this->tree->getOptionMenu($product->id, 'bug', 0, $branch === 'all' ? 'all' : (string)$branch); + $this->view->plans = $this->loadModel('productplan')->getPairs($product->id, $branch, '', true); } /**