* finish task #2569.

This commit is contained in:
chenfeiCF
2016-03-29 14:27:57 +08:00
parent e1c08416f1
commit 590afbf92e
8 changed files with 92 additions and 12 deletions
+26
View File
@@ -402,6 +402,32 @@ class task extends control
$this->display();
}
/**
* Batch change the module of task.
*
* @param int $moduleID
* @access public
* @return void
*/
public function batchChangeModule($moduleID)
{
if($this->post->taskIDList)
{
$taskIDList = $this->post->taskIDList;
unset($_POST['taskIDList']);
$allChanges = $this->task->batchChangeModule($taskIDList, $moduleID);
if(dao::isError()) die(js::error(dao::getError()));
foreach($allChanges as $taskID => $changes)
{
$this->loadModel('action');
$actionID = $this->action->create('task', $taskID, 'Edited');
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
}
die(js::reload('parent'));
}
/**
* Batch update assign of task.
*