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 || [];