* Finish task #38178.

This commit is contained in:
hufangzhou
2021-05-13 10:23:25 +08:00
parent b12c613ed9
commit d4e19aed32
3 changed files with 25 additions and 14 deletions
+14 -11
View File
@@ -317,13 +317,14 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->view;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->testreportTitle = $this->dao->select('title')->from(TABLE_TESTREPORT)->where('id')->eq($task->testreport)->fetch('title');
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->display();
}
@@ -742,14 +743,16 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->edit;
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$testreports = $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where('builds')->like('%' . $task->build . '%')->fetchPairs('id','title');
$this->view->task = $task;
$this->view->executions = $executions;
$this->view->builds = $builds;
$this->view->testreports = $testreports;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');