diff --git a/module/bug/control.php b/module/bug/control.php index 3362367200..f68db7d1dd 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -250,11 +250,6 @@ class bug extends control $productID = $this->product->saveState($productID, $this->products); $this->bug->setMenu($this->products, $productID); - /* Remove the unused types. */ - unset($this->lang->bug->typeList['designchange']); - unset($this->lang->bug->typeList['newfeature']); - unset($this->lang->bug->typeList['trackthings']); - /* Init vars. */ $moduleID = 0; $projectID = 0; @@ -401,11 +396,6 @@ class bug extends control } } - /* Remove the unused types. */ - unset($this->lang->bug->typeList['designchange']); - unset($this->lang->bug->typeList['newfeature']); - unset($this->lang->bug->typeList['trackthings']); - $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->batchCreate; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->bug->batchCreate; @@ -519,14 +509,6 @@ class bug extends control $projectID = $bug->project; $currentModuleID = $bug->module; - /** - * Remove designchange, newfeature, trackings from the typeList, because should be tracked in story or task. - * These thress types if upgrade from bugfree2.x. - */ - if($bug->type != 'designchange') unset($this->lang->bug->typeList['designchange']); - if($bug->type != 'newfeature') unset($this->lang->bug->typeList['newfeature']); - if($bug->type != 'trackthings') unset($this->lang->bug->typeList['trackthings']); - /* Set the menu. */ $this->bug->setMenu($this->products, $productID); diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 0d206b6c84..bc9b010747 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -41,6 +41,11 @@ bug->typeList['designchange']); + unset($lang->bug->typeList['newfeature']); + unset($lang->bug->typeList['trackthings']); + $moduleOptionMenu += array('ditto' => $lang->bug->ditto); $projects += array('ditto' => $lang->bug->ditto); $lang->bug->typeList += array('ditto' => $lang->bug->ditto); diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index db1c9f59c8..0305c51f10 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -39,13 +39,14 @@ * Remove designchange, newfeature, trackings from the typeList, because should be tracked in story or task. * These thress types if upgrade from bugfree2.x. */ - if($bugs[$bugID]->type != 'designchange') unset($this->lang->bug->typeList['designchange']); - if($bugs[$bugID]->type != 'newfeature') unset($this->lang->bug->typeList['newfeature']); - if($bugs[$bugID]->type != 'trackthings') unset($this->lang->bug->typeList['trackthings']); + $typeList = $lang->bug->typeList; + if($bugs[$bugID]->type != 'designchange') unset($typeList['designchange']); + if($bugs[$bugID]->type != 'newfeature') unset($typeList['newfeature']); + if($bugs[$bugID]->type != 'trackthings') unset($typeList['trackthings']); ?> - bug->typeList, $bugs[$bugID]->type, 'class=form-control');?> + type, 'class=form-control');?> bug->severityList, $bugs[$bugID]->severity, 'class=form-control');?> bug->priList, $bugs[$bugID]->pri, 'class=form-control');?> title, 'class=form-control');?> diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 368b94b8e2..2a92d5dd4e 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -93,7 +93,13 @@ js::set('refresh', $lang->refresh); bug->lblTypeAndSeverity;?>
- bug->typeList, $type, "class='form-control' style='width: 50%'");?> + bug->typeList['designchange']); + unset($lang->bug->typeList['newfeature']); + unset($lang->bug->typeList['trackthings']); + echo html::select('type', $lang->bug->typeList, $type, "class='form-control' style='width: 50%'"); + ?> bug->severityList, $severity, "class='form-control' style='width: 50%'");?>
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 5f8f606956..98e9be7f0b 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -88,7 +88,18 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild); bug->type;?> - bug->typeList, $bug->type, "class='form-control'");?> + + type != 'designchange') unset($lang->bug->typeList['designchange']); + if($bug->type != 'newfeature') unset($lang->bug->typeList['newfeature']); + if($bug->type != 'trackthings') unset($lang->bug->typeList['trackthings']); + echo html::select('type', $lang->bug->typeList, $bug->type, "class='form-control'"); + ?> + bug->severity;?>