From 6ce7856902881feb1760a50e396126fd3ccef59c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 9 Oct 2024 16:16:30 +0300 Subject: [PATCH] stream: force one assignee for emails --- application/Espo/Tools/Stream/Service.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/Espo/Tools/Stream/Service.php b/application/Espo/Tools/Stream/Service.php index 5dc58face6..a5226e888d 100644 --- a/application/Espo/Tools/Stream/Service.php +++ b/application/Espo/Tools/Stream/Service.php @@ -587,7 +587,9 @@ class Service } else if ( $entity instanceof CoreEntity && $entity->hasLinkMultipleField(self::FIELD_ASSIGNED_USERS) && - $entity->getLinkMultipleIdList(self::FIELD_ASSIGNED_USERS) !== [] + $entity->getLinkMultipleIdList(self::FIELD_ASSIGNED_USERS) !== [] && + // Exclude for Email as the assignedUsers serves not for direct assignment. + $entity->getEntityType() !== Email::ENTITY_TYPE ) { /** @var LinkMultiple $users */ $users = $entity->getValueObject(self::FIELD_ASSIGNED_USERS); @@ -1195,7 +1197,9 @@ class Service { if ( $entity instanceof CoreEntity && - $entity->hasLinkMultipleField(self::FIELD_ASSIGNED_USERS) + $entity->hasLinkMultipleField(self::FIELD_ASSIGNED_USERS) && + // Exclude for Email as the assignedUsers serves not for direct assignment. + $entity->getEntityType() !== Email::ENTITY_TYPE ) { $data = [];