• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/kanbanservice.php
  • Класс: BitrixTasksScrumServiceKanbanService
  • Вызов: KanbanService::getStagesToTask
public function getStagesToTask(int $taskId): array
{
	$itemService = new ItemService();
	$entityService = new EntityService();

	$scrumItem = $itemService->getItemBySourceId($taskId);
	if ($itemService->getErrors() || $scrumItem->isEmpty())
	{
		return [];
	}

	$entity = $entityService->getEntityById($scrumItem->getEntityId());
	if ($entityService->getErrors() || $entity->isEmpty())
	{
		return [];
	}

	if ($entity->getEntityType() === EntityForm::BACKLOG_TYPE)
	{
		return [];
	}

	return $this->getStages($entity->getId());
}