* finish task #2570.

This commit is contained in:
chenfeiCF
2016-03-30 10:37:52 +08:00
parent 2be4df6319
commit 9c4a37c800
5 changed files with 173 additions and 97 deletions
+27
View File
@@ -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.
*