From e192ea3c4152cf4301004929b099261a4a868a08 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 19 Dec 2024 14:57:40 +0200 Subject: [PATCH] stream updated at only if stream enabled --- application/Espo/Tools/Stream/Service.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/Espo/Tools/Stream/Service.php b/application/Espo/Tools/Stream/Service.php index 7305e3bc4d..0b7a9df236 100644 --- a/application/Espo/Tools/Stream/Service.php +++ b/application/Espo/Tools/Stream/Service.php @@ -790,6 +790,10 @@ class Service $this->entityManager->saveEntity($note, $noteOptions); + if (!$this->checkIsEnabled($parent->getEntityType())) { + return; + } + $this->updateStreamUpdatedAt($parent); } @@ -832,6 +836,10 @@ class Service $this->entityManager->saveEntity($note, $noteOptions); + if (!$this->checkIsEnabled($parent->getEntityType())) { + return; + } + $this->updateStreamUpdatedAt($parent); } @@ -965,7 +973,8 @@ class Service $entity->isNew() || $this->hasAuditedFieldChanged($entity) || $this->hasStatusFieldChanged($entity) || - $this->hasAssignedUserChanged($entity); + $this->hasAssignedUserChanged($entity) && + $this->checkIsEnabled($entity->getEntityType()); } private function hasAssignedUserChanged(Entity $entity): bool