From d900eb39e9ed3b66f1563e10b90d18faafe991aa Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 15 Aug 2023 16:33:16 +0800 Subject: [PATCH] * testcase: separate the case id and scene id with different variables. --- module/testcase/control.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index a881a49590..a4a1ec370a 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1125,7 +1125,7 @@ class testcase extends control { if(!$this->post->caseIDList) return print(js::locate($this->session->caseList)); - $caseIDList = $this->testcase->filterIdList($this->post->caseIDList); + $caseIDList = array_filter($this->post->caseIDList); $testtasks = $this->loadModel('testtask')->getGroupByCases($caseIDList); if($this->post->title) { @@ -1403,9 +1403,9 @@ class testcase extends control */ public function batchDelete($productID = 0) { - if($this->post->caseIDList) + if($this->post->caseIDList || $this->post->sceneIDList) { - $this->testcase->batchDelete($this->post->caseIDList); + $this->testcase->batchDelete($this->post->caseIDList, $this->post->sceneIDList); if(dao::isError()) return print(js::error(dao::getError())); } echo js::locate($this->session->caseList); @@ -1438,9 +1438,9 @@ class testcase extends control */ public function batchChangeModule($moduleID) { - if($this->post->caseIDList) + if($this->post->caseIDList || $this->post->sceneIDList) { - $this->testcase->batchChangeModule($this->post->caseIDList, $moduleID); + $this->testcase->batchChangeModule($this->post->caseIDList, $this->post->sceneIDList, $moduleID); if(dao::isError()) return print(js::error(dao::getError())); } @@ -1687,7 +1687,7 @@ class testcase extends control { if($this->post->caseIDList) { - $caseIDList = $this->testcase->filterIdList($this->post->caseIDList); + $caseIDList = array_filter($this->post->caseIDList); foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false); } echo js::locate($this->session->caseList);