diff --git a/module/execution/control.php b/module/execution/control.php index 301dbaf5f3..4475f458d8 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2149,6 +2149,7 @@ class execution extends control $this->view->executionID = $executionID; $this->view->productID = $productID; $this->view->productNames = $productNames; + $this->view->productNum = count($products); $this->view->allPlans = $allPlans; $this->view->browseType = $browseType; $this->view->kanbanGroup = $kanbanGroup; diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index 62c7207420..a506c790ea 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -803,7 +803,11 @@ function createColumnCreateMenu(options) else if(col.laneType == 'bug') { if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}}); - if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}}); + if(priv.canBatchCreateBug) + { + if(productNum == 1) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}}); + if(productNum > 1) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}}); + } } else { diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index b862ca317b..c3384d74c5 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -96,7 +96,12 @@ ' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '';?> ';?> ' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '';?> - ' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '';?> + ' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=0&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . ''; + if($productNum > 1) $batchCreateBugLink = '
  • ' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '
  • '; + echo $batchCreateBugLink; + }?> ';?> ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '';?> ' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '';?> @@ -155,6 +160,7 @@ +