* Fix feedback #1358.

This commit is contained in:
chaideqing
2022-11-30 11:13:12 +08:00
parent c71b65d8b0
commit 9fcb9099a7
2 changed files with 32 additions and 3 deletions
+24 -2
View File
@@ -3921,8 +3921,15 @@ class taskModel extends model
public function getToAndCcList($task)
{
/* Set toList and ccList. */
$toList = $task->assignedTo;
$ccList = trim($task->mailto, ',');
$toList = $task->assignedTo;
$ccList = trim($task->mailto, ',');
$toTeamTaskList = '';
if($task->mode == 'multi')
{
$toTeamTaskList = $this->getTeamTaskAssignedTo($task->id);
$toTeamTaskList = implode(',', $toTeamTaskList);
$toList = $toTeamTaskList;
}
if(empty($toList))
{
@@ -4339,4 +4346,19 @@ class taskModel extends model
$order ++;
}
}
/**
* Get teamTask assignedTo.
*
* @param int $taskID
* @access public
* @return array
*/
public function getTeamTaskAssignedTo($taskID)
{
$taskType = $this->dao->select('mode')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch('mode');
if($taskType != 'multi') return array();
$assignedToList = $this->dao->select('account')->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->fetchPairs();
return empty($assignedToList) ? array() : array_keys($assignedToList);
}
}