From 87875c1a7fa8df6944be253e1fbff9ea1cc517bf Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 11 Feb 2025 13:08:32 +0200 Subject: [PATCH] task reminder re-appearing fix --- .../Resources/metadata/clientDefs/Task.json | 34 ------------------- .../Resources/metadata/entityDefs/Task.json | 3 +- .../src/handlers/task/reminders-handler.js | 6 ++++ 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json index 8c342a3d46..e08d486664 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json @@ -58,40 +58,6 @@ } ] } - }, - "reminders": { - "visible": { - "conditionGroup": [ - { - "type": "and", - "value": [ - { - "type": "or", - "value": [ - { - "type": "isNotEmpty", - "attribute": "dateEnd" - }, - { - "type": "isNotEmpty", - "attribute": "dateEndDate" - } - ] - }, - { - "type": "notEquals", - "attribute": "status", - "value": "Completed" - }, - { - "type": "notEquals", - "attribute": "status", - "value": "Canceled" - } - ] - } - ] - } } } }, diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json index a90f3e70c4..bf54e9d45c 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json @@ -89,7 +89,8 @@ "Espo\\Modules\\Crm\\Classes\\FieldValidators\\Event\\Reminders\\Valid", "Espo\\Modules\\Crm\\Classes\\FieldValidators\\Event\\Reminders\\MaxCount" ], - "duplicateIgnore": true + "duplicateIgnore": true, + "dynamicLogicDisabled": true }, "description": { "type": "text", diff --git a/client/modules/crm/src/handlers/task/reminders-handler.js b/client/modules/crm/src/handlers/task/reminders-handler.js index 5a4a6d7f90..cfff68e563 100644 --- a/client/modules/crm/src/handlers/task/reminders-handler.js +++ b/client/modules/crm/src/handlers/task/reminders-handler.js @@ -63,6 +63,12 @@ class RemindersHandler { } control() { + if (!this.model.attributes.dateEnd && !this.model.attributes.dateEndDate) { + this.view.hideField('reminders'); + + return; + } + /** @type {string[]} */ const assignedUsersIds = this.model.attributes.assignedUsersIds || [];