From 0f9d06739e34d3b3f200662833a81c334e884769 Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 27 May 2026 09:52:13 +0000 Subject: [PATCH] fix(2.10.3): expose AssistantRule + CaseMemory in Admin Layout Manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two metadata gaps spotted when the user couldn't see Shira entities in Admin → Layout Manager and got console 404s on /#CaseMemory: * AssistantRule.json (scopes/) was missing `customizable: true` and `importable: false`. Without `customizable: true` EspoCRM hides the entity from Admin → Entity Manager → Layouts. Other Shira entities already had it; this one was the outlier. * CaseMemory.json (clientDefs/) didn't exist at all. The Metadata endpoint returned an empty object, so the frontend fell through to default convention `client/custom/modules/smart-assistant/src/controllers/case-memory.js` which doesn't exist → 404 in browser console. Adding clientDefs with `controller: controllers/record` + icon + filters lets the standard record controller handle the entity without any custom JS file. Verified on prod after hot-patch: - Metadata?key=scopes.AssistantRule.customizable → "true" - Metadata?key=clientDefs.CaseMemory → full object Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Resources/metadata/clientDefs/CaseMemory.json | 10 ++++++++++ .../Resources/metadata/scopes/AssistantRule.json | 4 +++- manifest.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 files/custom/Espo/Modules/SmartAssistant/Resources/metadata/clientDefs/CaseMemory.json diff --git a/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/clientDefs/CaseMemory.json b/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/clientDefs/CaseMemory.json new file mode 100644 index 0000000..ba9351b --- /dev/null +++ b/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/clientDefs/CaseMemory.json @@ -0,0 +1,10 @@ +{ + "controller": "controllers/record", + "color": "#9b59b6", + "iconClass": "fas fa-brain", + "boolFilterList": ["onlyMy"], + "filterList": [ + {"name": "pinned"}, + {"name": "byCategory"} + ] +} diff --git a/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/scopes/AssistantRule.json b/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/scopes/AssistantRule.json index 3c99bf1..5ea262d 100644 --- a/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/scopes/AssistantRule.json +++ b/files/custom/Espo/Modules/SmartAssistant/Resources/metadata/scopes/AssistantRule.json @@ -7,5 +7,7 @@ "aclLevelList": ["all", "team", "own", "no"], "stream": false, "tab": true, - "disabled": false + "disabled": false, + "importable": false, + "customizable": true } diff --git a/manifest.json b/manifest.json index 8818e41..f3088f7 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "module": "SmartAssistant", "description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and AI Gateway integration", "author": "klear", - "version": "2.10.2", + "version": "2.10.3", "acceptableVersions": [ ">=8.0.0" ],