• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/itemservice.php
  • Класс: BitrixTasksScrumServiceItemService
  • Вызов: ItemService::getItemIdsByTypeId
public function getItemIdsByTypeId(int $typeId): array
{
	$itemIds = [];

	try
	{
		$queryObject = ItemTable::getList([
			'select' => ['ID'],
			'filter' => ['TYPE_ID' => $typeId],
			'order' => ['ID' => 'DESC'],
		]);
		while ($itemData = $queryObject->fetch())
		{
			$itemIds[] = $itemData['ID'];
		}
	}
	catch (Exception $exception)
	{
		$this->errorCollection->setError(
			new Error(
				$exception->getMessage(),
				self::ERROR_COULD_NOT_READ_ITEM_BY_TYPE_ID
			)
		);
	}

	return $itemIds;
}