* testcase: refactor methods to batch change branch of cases.

This commit is contained in:
liugang
2023-08-14 15:07:03 +08:00
parent 21e8e01609
commit 4e17ebfd23
2 changed files with 24 additions and 26 deletions
+1 -10
View File
@@ -1422,17 +1422,8 @@ class testcase extends control
{
if($this->post->caseIDList)
{
$caseIDList = $this->post->caseIDList;
$caseIDList = array_unique($caseIDList);
unset($_POST['caseIDList']);
$allChanges = $this->testcase->batchChangeBranch($caseIDList, $branchID);
$this->testcase->batchChangeBranch($this->post->caseIDList, $branchID);
if(dao::isError()) return print(js::error(dao::getError()));
foreach($allChanges as $caseID => $changes)
{
$this->loadModel('action');
$actionID = $this->action->create('case', $caseID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
}
echo js::locate($this->session->caseList, 'parent');