From d5f294fd7ba2230421412818304c41f7d4137a0b Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 2 Jun 2022 04:25:09 +0800 Subject: [PATCH] * Fix bug#23159. --- module/testtask/control.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 8d29af46bc..cd10ad9833 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -752,6 +752,12 @@ class testtask extends control $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); } + if(!isset($this->products[$productID])) + { + $product = $this->product->getByID($productID); + $this->products[$productID] = $product->name; + } + $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->edit; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->common; @@ -762,11 +768,15 @@ class testtask extends control $projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project; $executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID); $executionID = $task->execution; - $builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,notrunk', $executionID, 'execution'); + if(!isset($executions[$executionID])) + { + $appendExecution = $this->loadModel('execution')->getByID($executionID); + $executions[$executionID] = $appendExecution->name; + } $this->view->task = $task; $this->view->executions = $executions; - $this->view->builds = $builds; + $this->view->builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,notrunk', $executionID, 'execution'); $this->view->testreports = $this->loadModel('testreport')->getPairs($task->product, $task->testreport); $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', $task->owner); $this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');