• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/epicservice.php
  • Класс: BitrixTasksScrumServiceEpicService
  • Вызов: EpicService::updateEpic
public function updateEpic(int $epicId, EpicForm $epic, PushService $pushService = null): bool
{
	try
	{
		$result = EpicTable::update($epicId, $epic->getFieldsToUpdate());

		if ($result->isSuccess())
		{
			if ($pushService)
			{
				$pushService->sendUpdateEpicEvent($epic);
			}

			(new CacheService($epicId, CacheService::EPICS))->clean();

			return true;
		}
		else
		{
			$this->setErrors($result, self::ERROR_COULD_NOT_UPDATE_EPIC);

			return false;
		}
	}
	catch (Exception $exception)
	{
		$this->errorCollection->setError(
			new Error(
				$exception->getMessage(),
				self::ERROR_COULD_NOT_UPDATE_EPIC
			)
		);

		return false;
	}
}