* Finish task #45005,45007.

This commit is contained in:
tianshujie
2021-11-30 10:12:47 +08:00
parent 0cf53a32e0
commit 826a99a0b7
+5 -4
View File
@@ -1037,8 +1037,8 @@ class testtask extends control
/* Build the search form. */
$this->loadModel('testcase');
$this->config->testcase->search['params']['product']['values']= array($productID => $this->products[$productID]);
$this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case');
$this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID]);
$this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, $task->branch);
$this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID=$taskID&type=$type&param=$param");
$this->config->testcase->search['style'] = 'simple';
if($task->productType == 'normal')
@@ -1049,10 +1049,11 @@ class testtask extends control
else
{
$this->config->testcase->search['fields']['branch'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$task->productType]);
$branches = array('' => '') + $this->loadModel('branch')->getPairs($task->product, 'noempty');
if($task->branch) $branches = array('' => '', $task->branch => $branches[$task->branch]);
$branchName = $this->loadModel('branch')->getById($task->branch);
$branches = array('' => '', BRANCH_MAIN => $this->lang->branch->main, $task->branch => $branchName);
$this->config->testcase->search['params']['branch']['values'] = $branches;
}
if(!$this->config->testcase->needReview) unset($this->config->testcase->search['params']['status']['values']['wait']);
$this->loadModel('search')->setSearchParams($this->config->testcase->search);