- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/controllers/dod.php
- Класс: BitrixTasksScrumControllersDoD
- Вызов: DoD::getParticipantsIds
private function getParticipantsIds(int $groupId, array $participantsCodes): array
{
$participantsIds = [];
$scrumMasterRole = 'M';
$group = Workgroup::getById($groupId);
$scrumMasterId = (int) $group->getScrumMaster();
foreach ($participantsCodes as $code)
{
if (mb_substr($code, 0, 1) === 'U')
{
$userId = (int) mb_substr($code, 1);
if (!in_array($userId, $participantsIds))
{
$participantsIds[] = $userId;
}
}
elseif (preg_match('/^SG([0-9]+)_?([AEKM])?$/', $code, $match) && isset($match[2]))
{
$role = $match[2];
if ($role === $scrumMasterRole)
{
$participantsIds[] = $scrumMasterId;
}
else
{
$participantsIds = array_merge(
$participantsIds,
$this->getSonetUserIds($groupId, $role, $scrumMasterId)
);
}
}
}
return $participantsIds;
}