From 985c6fb64b1d9f05539b68a5dbceb6fdc81ea7ae Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 13 Mar 2025 17:08:16 +0200 Subject: [PATCH] fix free busy service --- application/Espo/Modules/Crm/Tools/Calendar/Service.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/Espo/Modules/Crm/Tools/Calendar/Service.php b/application/Espo/Modules/Crm/Tools/Calendar/Service.php index b2ef0bb660..fe7ac47d6f 100644 --- a/application/Espo/Modules/Crm/Tools/Calendar/Service.php +++ b/application/Espo/Modules/Crm/Tools/Calendar/Service.php @@ -708,7 +708,7 @@ class Service private function fetchWorkingRangeListForTeams(array $teamIdList, FetchParams $fetchParams): array { $teamList = iterator_to_array( - $this->entityManager + $this->entityManager ->getRDBRepositoryByClass(Team::class) ->where([Attribute::ID => $teamIdList]) ->find() @@ -794,6 +794,13 @@ class Service ->withFrom($params->from) ->withTo($params->to); + if ($fetchParams->getScopeList() === null) { + $fetchParams = $fetchParams->withScopeList( + $this->config->get('busyRangesEntityList') ?? + [Meeting::ENTITY_TYPE, Call::ENTITY_TYPE] + ); + } + $eventList = $this->fetchInternal($user, $fetchParams->withSkipAcl(), !$params->accessCheck); $ignoreHash = (object) [];