* [refac bug #56983] Adjust for auto case priv.

This commit is contained in:
wangyidong
2024-11-15 10:34:10 +08:00
committed by 孙广明
parent 92af889b41
commit fb98e737e4
7 changed files with 62 additions and 14 deletions
+5 -5
View File
@@ -918,15 +918,15 @@ class testtask extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $url));
}
if(!$this->post->caseIdList) $this->locate($url);
/* 根据不同情况获取要批量执行的用例。*/
/* Get cases to run according to different situations. */
$caseIdList = array_unique($this->post->caseIdList);
$cases = $this->testtaskZen->prepareCasesForBatchRun($productID, $orderBy, $from, $taskID, $confirm, $caseIdList);
$caseIdList = $this->loadModel('testcase')->ignoreAutoCaseIdList((array)$this->post->caseIdList);
if(empty($caseIdList)) $this->locate($url);
$cases = $this->testtaskZen->prepareCasesForBatchRun($productID, $orderBy, $from, $taskID, $confirm, $caseIdList);
if(empty($cases)) return $this->send(array('result' => 'fail', 'load' => array('alert' => $this->lang->testtask->skipChangedCases, 'locate' => $url)));
$steps = $this->loadModel('testcase')->getStepGroupByIdList($caseIdList);
$steps = $this->testcase->getStepGroupByIdList($caseIdList);
$emptyCases = '';
foreach($cases as $caseID => $case)