From 6d57ca1ea8a03cdbd817063dfc01f072854c168d Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 22 Dec 2022 20:15:09 -1000 Subject: [PATCH] Bug 32519: In Elasticsearch mappings table use of search field name and label In Elasticsearch mappings table, in tabs for mappings we should add search field name in addition to label ; in order to find them when searching using DataTable search field. This is very useful when debugging. Also the lines are sorting alphabetically by search field name. So I propose to display name and label between parenthesis. And also add label to the form in last line. By default label equals name so I display label only if different from name. Test plan : 1) Go to : Administration > Search engine configuration (Elasticsearch) 2) In first tabe edit a line to change label, for example : author => Auteur 3) Save 4) Go to second tab 5) Check you see a line with 'author (Auteur)' and lines with only name when label equals name 6) Look at last line (addition form) 7) Check you see in combobox : 'author (Auteur)' and lines with only name when label equals name Signed-off-by: Solene Ngamga Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 14a2cc60a404709edc97f6daed8ad8e00dd884e8) Signed-off-by: Matt Blenkinsop (cherry picked from commit c654d8b51eb8d19302d131e430ec95f7ad4586f4) Signed-off-by: Lucas Gass (cherry picked from commit 27e430325ef7734d12bdd9017259e9f0521898d8) Signed-off-by: Arthur Suzuki --- .../modules/admin/searchengine/elasticsearch/mappings.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt index 417b533b6a..d2c609b717 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -267,7 +267,8 @@ a.add, a.delete { - [% mapping.search_field_label | html %] + [ mapping.search_field_name | html %] + [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %] [% IF mapping.sort == 0 %] @@ -295,7 +296,8 @@ a.add, a.delete { - [% mapping.search_field_label | html %] + [% mapping.search_field_name | html %] + [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %] -- 2.39.5