* finish task 2016.

This commit is contained in:
ChuJilu
2014-10-24 14:08:27 +08:00
parent 71d329e28b
commit 067d69fc96
3 changed files with 54 additions and 6 deletions
+26
View File
@@ -394,6 +394,32 @@ class task extends control
$this->display();
}
/**
* Batch update assign of task.
*
* @param int $project
* @access public
* @return void
*/
public function batchAssignTo($project)
{
if(!empty($_POST))
{
$taskIDList = $this->post->taskIDList;
unset($_POST['taskIDList']);
foreach($taskIDList as $taskID)
{
$this->loadModel('action');
$changes = $this->task->assign($taskID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
die(js::locate($this->createLink('project', 'task', "projectID=$project"), 'parent'));
}
}
/**
* View a task.
*