* finish task #3429.
This commit is contained in:
@@ -842,6 +842,33 @@ class testcase extends control
|
||||
die(js::locate($this->session->caseList));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch change branch.
|
||||
*
|
||||
* @param int $branchID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchChangeBranch($branchID)
|
||||
{
|
||||
if($this->post->caseIDList)
|
||||
{
|
||||
$caseIDList = $this->post->caseIDList;
|
||||
$caseIDList = array_unique($caseIDList);
|
||||
unset($_POST['caseIDList']);
|
||||
$allChanges = $this->testcase->batchChangeBranch($caseIDList, $branchID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
foreach($allChanges as $caseID => $changes)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$actionID = $this->action->create('case', $caseID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
|
||||
die(js::locate($this->session->caseList, 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch change the module of case.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user