* Finish task #7584.

This commit is contained in:
tianshujie98
2020-08-05 09:29:53 +08:00
parent 99aa236209
commit 7dc09c5374
3 changed files with 10 additions and 3 deletions
+6 -1
View File
@@ -577,9 +577,14 @@ class task extends control
unset($_POST['taskIDList']);
if(!is_array($taskIDList)) die(js::locate($this->createLink('project', 'task', "projectID=$project"), 'parent'));
$taskIDList = array_unique($taskIDList);
foreach($taskIDList as $taskID)
$muletipleTasks = $this->dao->select('root')->from(TABLE_TEAM)->where('type')->eq('task')->andWhere('root')->in($taskIDList)->fetchPairs();
$tasks = $this->task->getByList($taskIDList);
foreach($tasks as $taskID => $task)
{
$this->loadModel('action');
if(in_array($taskID, $muletipleTasks) and $task->assignedTo != $this->app->user->account) continue;
$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);