From 02080b8bcb7195b2b809bcaac8a09d8a4e39cb7a Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 10 Oct 2023 14:00:26 +0800 Subject: [PATCH] * Finish task #104000. --- module/execution/control.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index ab5846189f..9dc7bb18c1 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -591,6 +591,9 @@ class execution extends control $executions = $this->execution->getPairs(0, 'all', 'nocode'); $this->execution->setMenu($executionID); + $execution = $this->execution->getByID($executionID); + $project = $this->loadModel('project')->getByID($execution->project); + /* Load pager. */ $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); @@ -613,13 +616,18 @@ class execution extends control ->leftJoin(TABLE_EXECUTION)->alias('t2') ->on('t1.project = t2.id') ->where('t1.product')->in(array_keys($products)) + ->andWhere('t2.type')->in('sprint,stage,kanban') ->fetchPairs('project'); + + $projects = $this->loadModel('product')->getProjectPairsByProductIDList(array_keys($products)); } else { $executionName = $executions[$executionID]; unset($executions); $executions[$executionID] = $executionName; + + $projects[$project->id] = $project->name; } /* Get bugs.*/ @@ -651,9 +659,6 @@ class execution extends control $bugs = $this->execution->getSearchBugs($products, $executionID, $bugQuery, $pager, 'id_desc'); } - $execution = $this->execution->getByID($executionID); - $project = $this->loadModel('project')->getByID($execution->project); - /* Build the search form. */ $this->config->bug->search['actionURL'] = $this->createLink('execution', 'importBug', "executionID=$executionID&browseType=bySearch¶m=myQueryID"); $this->config->bug->search['queryID'] = $queryID; @@ -687,6 +692,8 @@ class execution extends control } $this->config->bug->search['params']['module']['values'] = $bugModules; + $this->config->bug->search['params']['project']['values'] = array('' => '') + $projects; + unset($this->config->bug->search['fields']['resolvedBy']); unset($this->config->bug->search['fields']['closedBy']); unset($this->config->bug->search['fields']['status']);