diff --git a/module/bug/control.php b/module/bug/control.php index 6000b0bf0d..5d64532e29 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -126,7 +126,7 @@ class bug extends control $this->bugZen->buildBrowseSearchForm($productID, $branch, $queryID); - $executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple'); + $executions = $this->loadModel('execution')->fetchPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple'); $bugs = $this->bugZen->getBrowseBugs((int)$product->id, $branch, $browseType, array_keys($executions), $moduleID, $queryID, $realOrderBy, $pager); $this->bugZen->buildBrowseView($bugs, (object)$product, $branch, $browseType, $moduleID, $executions, $param, $orderBy, $pager); diff --git a/module/bug/model.php b/module/bug/model.php index f5d23d0498..f9beb72933 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -197,10 +197,11 @@ class bugModel extends model * @param string $executions * @param array $excludeBugs * @param object $pager + * @param string $orderBy * @access public * @return array */ - public function getActiveBugs(array|int $products, int|string $branch, string $executions, array $excludeBugs, object $pager = null): array + public function getActiveBugs(array|int $products, int|string $branch, string $executions, array $excludeBugs, object $pager = null, string $orderBy = 'id desc'): array { return $this->dao->select('*')->from(TABLE_BUG) ->where('status')->eq('active') @@ -211,7 +212,7 @@ class bugModel extends model ->beginIF(!empty($executions))->andWhere('execution')->in($executions)->fi() ->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi() ->andWhere('deleted')->eq(0) - ->orderBy('id desc') + ->orderBy($orderBy) ->page($pager) ->fetchAll(); } diff --git a/module/bug/ui/edit.html.php b/module/bug/ui/edit.html.php index eb05d25a93..63adc7c2db 100644 --- a/module/bug/ui/edit.html.php +++ b/module/bug/ui/edit.html.php @@ -174,7 +174,8 @@ detailBody ( set::name('plan'), set::items($plans), - set::value($bug->plan) + set::value($bug->plan), + setData('max_drop_width', '100%') ) ) ), @@ -458,7 +459,8 @@ detailBody ( set::name('task'), set::items($tasks), - set::value($bug->task) + set::value($bug->task), + setData('max_drop_width', '100%') ) ) ) diff --git a/module/bug/view/batchactivate.html.php b/module/bug/view/batchactivate.html.php index ad34430918..a379f02438 100644 --- a/module/bug/view/batchactivate.html.php +++ b/module/bug/view/batchactivate.html.php @@ -13,7 +13,7 @@ config->edition == 'biz' || $this->config->edition == 'max') +if($this->config->edition != 'open') { $action = $this->loadModel('workflowaction')->getByModuleAndAction('bug', 'batchactivate'); if($action->js) echo ""; diff --git a/module/bug/zen.php b/module/bug/zen.php index 3a03bd8e55..b9b332c5ba 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -433,6 +433,12 @@ class bugZen extends bug $executions = isset($executions[$executionID]) ? $executions : $executions + array($executionID => $execution->name); } + if($execution and !$execution->multiple) + { + $this->config->bug->list->customCreateFields = str_replace('execution,', '', $this->config->bug->list->customCreateFields); + $this->config->bug->custom->createFields = str_replace('execution,', '', $this->config->bug->custom->createFields); + } + return $this->updateBug($bug, array('executions' => $executions, 'execution' => $execution)); }