* finish task 2106.

This commit is contained in:
ChuJilu
2014-10-24 16:17:03 +08:00
parent 067d69fc96
commit 1cae54bcaf
3 changed files with 115 additions and 52 deletions

View File

@@ -658,6 +658,32 @@ class bug extends control
$this->display();
}
/**
* Batch update assign of bug.
*
* @param int $projectID
* @access public
* @return void
*/
public function batchAssignTo($projectID)
{
if(!empty($_POST) && isset($_POST['bugIDList']))
{
$bugIDList = $this->post->bugIDList;
unset($_POST['bugIDList']);
foreach($bugIDList as $bugID)
{
$this->loadModel('action');
$changes = $this->bug->assign($bugID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('bug', $bugID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
$this->sendmail($bugID, $actionID);
}
}
die(js::locate($this->createLink('project', 'bug', "projectID=$projectID")));
}
/**
* confirm a bug.
*