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 <noreply@anthropic.com>
This commit is contained in:
Alexandre
2026-09-18 11:23:51 +02:00
committed by GitHub
parent 88c22562c0
commit 9120e54a73
3 changed files with 8 additions and 2 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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]"