• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/controllers/calendar.php
  • Класс: BitrixTasksScrumControllersCalendar
  • Вызов: Calendar::saveEventInfoAction
public function saveEventInfoAction(int $groupId, string $templateId, int $eventId): ?bool
{
	$userId = User::getId();

	$eventData = $this->getEventData($userId, $eventId);
	if (empty($eventData['ID']))
	{
		return null;
	}

	$this->createChat($userId, $eventId, $eventData);

	$backlogService = new BacklogService();

	$backlog = $backlogService->getBacklogByGroupId($groupId);

	$backlog->getInfo()->setEvents([$templateId => $eventId]);

	$backlogService->changeBacklog($backlog);
	if (!empty($backlogService->getErrors()))
	{
		$this->errorCollection->add([new Error('System error')]);

		return null;
	}

	return true;
}