* Finish task #44369.

This commit is contained in:
liumengyi
2021-11-17 14:39:37 +08:00
parent 0ba93971f8
commit 30204c1568
4 changed files with 103 additions and 6 deletions
+27
View File
@@ -1168,6 +1168,33 @@ class bug extends control
die(js::locate($this->session->bugList, 'parent'));
}
/**
* Batch change the plan of bug.
*
* @param int $planID
* @access public
* @return void
*/
public function batchChangePlan($planID)
{
if($this->post->bugIDList)
{
$bugIDList = $this->post->bugIDList;
$bugIDList = array_unique($bugIDList);
unset($_POST['bugIDList']);
$allChanges = $this->bug->batchChangePlan($bugIDList, $planID);
if(dao::isError()) die(js::error(dao::getError()));
foreach($allChanges as $bugID => $changes)
{
$this->loadModel('action');
$actionID = $this->action->create('bug', $bugID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
}
$this->loadModel('score')->create('ajax', 'batchOther');
die(js::locate($this->session->bugList, 'parent'));
}
/**
* Batch update assign of bug.
*