* finish task #2570.
This commit is contained in:
@@ -110,6 +110,7 @@ class bug extends control
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', $branch);
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->bugs = $bugs;
|
||||
@@ -654,6 +655,32 @@ class bug extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch change the module of bug.
|
||||
*
|
||||
* @param int $moduleID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchChangeModule($moduleID)
|
||||
{
|
||||
if($this->post->bugIDList)
|
||||
{
|
||||
$bugIDList = $this->post->bugIDList;
|
||||
unset($_POST['bugIDList']);
|
||||
$allChanges = $this->bug->batchChangeModule($bugIDList, $moduleID);
|
||||
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->sendmail($bugID, $actionID);
|
||||
}
|
||||
}
|
||||
die(js::locate($this->session->bugList, 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch update assign of bug.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user