From 638086ba6b3760f80a38e4f3c207ce54801fc8dc Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 14 Aug 2023 15:09:14 +0800 Subject: [PATCH] * testcase: refactor the method to batch confirm story change of cases. --- module/testcase/control.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 0b5176abb4..a881a49590 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1685,10 +1685,11 @@ class testcase extends control */ public function batchConfirmStoryChange($productID = 0) { - if(!$this->post->caseIDList) return print(js::locate($this->session->caseList)); - $caseIDList = array_unique($this->post->caseIDList); - - foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false); + if($this->post->caseIDList) + { + $caseIDList = $this->testcase->filterIdList($this->post->caseIDList); + foreach($caseIDList as $caseID) $this->confirmStoryChange($caseID,false); + } echo js::locate($this->session->caseList); }