• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/taskservice.php
  • Класс: BitrixTasksScrumServiceTaskService
  • Вызов: TaskService::getSubTaskIds
public function getSubTaskIds(
	int $groupId,
	int $taskId,
	bool $notCompleted = true
): array
{
	$taskIds = [];

	try
	{
		$filter = [
			'PARENT_ID' => $taskId,
			'GROUP_ID' => $groupId,
		];
		if ($notCompleted)
		{
			$filter['!=STATUS'] = Status::COMPLETED;
		}

		$queryObject = CTasks::getList(
			['ID' => 'ASC'],
			$filter,
			['ID']
		);
		while ($taskData = $queryObject->fetch())
		{
			$taskIds[] = $taskData['ID'];
		}
	}
	catch (Exception $exception)
	{
		$this->errorCollection->setError(
			new Error(
				$exception->getMessage(),
				self::ERROR_COULD_NOT_CHECK_GET_SUB_TASK_IDS
			)
		);
	}

	return $taskIds;
}