* [story#69800,0.5h] add buildSearchConfig.

This commit is contained in:
qixinzhi
2024-12-10 10:48:33 +08:00
committed by 周鑫
parent 78600525e3
commit 565cc52316
+16
View File
@@ -2810,6 +2810,22 @@ class testcaseModel extends model
unset($this->config->testcase->search['fields']['product']);
unset($this->config->testcase->search['params']['product']);
$product = $this->loadModel('product')->getByID($productID ? $productID : 0);
if($productID)
{
if(isset($product->type) && $product->type == 'normal')
{
unset($this->config->testcase->search['fields']['branch']);
unset($this->config->testcase->search['params']['branch']);
}
else
{
$branches = $this->loadModel('branch')->getPairs($productID, '', 0);
$this->config->testcase->search['fields']['branch'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
$this->config->testcase->search['params']['branch']['values'] = array('' => '', BRANCH_MAIN => $this->lang->branch->main) + $branches + array('all' => $this->lang->branch->all);
}
}
if(!$this->config->testcase->needReview) unset($this->config->testcase->search['params']['status']['values']['wait']);
$searchConfig = $this->loadModel('search')->processBuildinFields('testcase', $this->config->testcase->search);