diff --git a/module/task/control.php b/module/task/control.php index 539f50d414..8ca243edde 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -759,7 +759,7 @@ class task extends control /* Get execution teams. */ $executionIDList = array(); foreach($tasks as $task) if(!in_array($task->execution, $executionIDList)) $executionIDList[] = $task->execution; - $executionTeams = $this->dao->select('*')->from(TABLE_TASKTEAM)->where('task')->in($executionIDList)->fetchGroup('task', 'id'); + $executionTeams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($executionIDList)->andWhere('type')->eq('execution')->fetchGroup('root', 'account'); /* Judge whether the editedTasks is too large and set session. */ $countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3);