From 9120e54a7380980efd371be52ed435ced960e6d4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 18 Sep 2026 11:23:51 +0200 Subject: [PATCH] monica: make contacts sortable by name in Meilisearch (#3067) (#3068) Backport monicahq/monica#7806: add first_name and last_name to the Contact sortableAttributes in config/scout.php so contact search no longer fails with HTTP 500. Co-authored-by: Claude Opus 5 --- monica/CHANGELOG.md | 3 +++ monica/Dockerfile | 5 ++++- monica/config.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/monica/CHANGELOG.md b/monica/CHANGELOG.md index fdc26ab428..79d14691c8 100644 --- a/monica/CHANGELOG.md +++ b/monica/CHANGELOG.md @@ -1,3 +1,6 @@ +## 5.0.0.5.4 (18-09-2026) + +- Fix contact search returning HTTP 500 ("first_name is not sortable") by backporting monicahq/monica#7806 so Meilisearch can sort contacts by name (#3067) - Migrate legacy add-on configuration map names to current app configuration terminology. ## 5.0.0.5.3 (2026-08-01) diff --git a/monica/Dockerfile b/monica/Dockerfile index 4ec746e95d..4988de2c93 100644 --- a/monica/Dockerfile +++ b/monica/Dockerfile @@ -93,7 +93,10 @@ RUN grep -rl "could you verify your email address by clicking on the link we jus done && \ \ # Fix dummy password - sed -i "s|admin123|Changeme123\\!|g" /var/www/html/app/Console/Commands/Local/SetupDummyAccount.php + sed -i "s|admin123|Changeme123\\!|g" /var/www/html/app/Console/Commands/Local/SetupDummyAccount.php && \ + \ + # Make contacts sortable by name in Meilisearch (backport of monicahq/monica#7806, #3067) + sed -i "/Contact::class => \[/,/sortableAttributes/ s|'sortableAttributes' => \['updated_at'\]|'sortableAttributes' => ['updated_at', 'first_name', 'last_name']|" /var/www/html/config/scout.php # Add entrypoint ENV S6_STAGE2_HOOK=/ha_entrypoint.sh diff --git a/monica/config.yaml b/monica/config.yaml index 9540f8847c..ac11063a16 100644 --- a/monica/config.yaml +++ b/monica/config.yaml @@ -108,5 +108,5 @@ services: - mysql:want slug: monica url: https://github.com/alexbelgium/hassio-addons/tree/master/monica -version: "5.0.0.5.3" +version: "5.0.0.5.4" webui: "[PROTO:ssl]://[HOST]:[PORT:80]"