• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/kanbanservice.php
  • Класс: BitrixTasksScrumServiceKanbanService
  • Вызов: KanbanService::hasDifferencesBetweenTwoSprints
public function hasDifferencesBetweenTwoSprints(int $firstSprintId, int $secondSprintId): bool
{
	$firstStages = [];
	$secondStages = [];

	$firstSprintId = (int) $firstSprintId;
	$secondSprintId = (int) $secondSprintId;

	$queryObject = StagesTable::getList([
		'select' => ['ENTITY_ID'],
		'filter' => [
			'=ENTITY_TYPE' => StagesTable::WORK_MODE_ACTIVE_SPRINT,
			'ENTITY_ID' => [$firstSprintId, $secondSprintId],
		],
		'order' => ['SORT' => 'ASC']
	]);
	while ($stage = $queryObject->fetch())
	{
		$entityId = (int) $stage['ENTITY_ID'];

		if ($entityId === $firstSprintId)
		{
			$firstStages[] = $stage;
		}
		else if ($entityId === $secondSprintId)
		{
			$secondStages[] = $stage;
		}
	}

	return count($firstStages) !== count($secondStages);
}