Bugzilla – Attachment 155764 Details for
Bug 34740
Sort option are wrong in search engine configuration (Elasticsearch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34740: Update sort options in ES config to by Yes/No
Bug-34740-Update-sort-options-in-ES-config-to-by-Y.patch (text/plain), 3.33 KB, created by
Katrin Fischer
on 2023-09-17 20:45:31 UTC
(
hide
)
Description:
Bug 34740: Update sort options in ES config to by Yes/No
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-17 20:45:31 UTC
Size:
3.33 KB
patch
obsolete
>From e1a236e22d52274563198a1a51eaff376eab6f83 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 7 Sep 2023 17:13:46 +0000 >Subject: [PATCH] Bug 34740: Update sort options in ES config to by Yes/No > >At some point the option for 'undef' was removed from te sort options >and was collapsed to yes/no > >The dropdowns when adding a new field were missed, this patch corrects that. > >While undef in a mappings file wil stil load, when saving we should not privde undef any longer > >To test: >1 - Browse to bottom to add a new field on the 'Bibliographic records' tab in > Administration > Search engine configuration (Elasticsearch) >2 - Set sortable column to undef, set other columns and provide a valid field >3 - Click '+Add' >4 - Click 'Save' >5 - At top of page you receive an error: > An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'sort' cannot be null at /kohadevbox/koha/Koha/SearchField.pm line 37 . >6 - Apply patch, restart all >7 - Add a new mapping, your only choices are Yes/No >8 - Save mapping >9 - Confirm it saves correctly > >Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/searchengine/elasticsearch/mappings.pl | 2 +- > .../en/modules/admin/searchengine/elasticsearch/mappings.tt | 5 ++--- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl >index e4d5ab10ea..10302624d3 100755 >--- a/admin/searchengine/elasticsearch/mappings.pl >+++ b/admin/searchengine/elasticsearch/mappings.pl >@@ -151,7 +151,7 @@ if ( $op eq 'edit' ) { > my $mapping_facet = $mapping_facet[$i]; > $mapping_facet = ( grep { $_ eq $search_field_name } @facetable_field_names ) ? $mapping_facet : 0; > my $mapping_suggestible = $mapping_suggestible[$i]; >- my $mapping_sort = $mapping_sort[$i] eq 'undef' ? undef : $mapping_sort[$i]; >+ my $mapping_sort = $mapping_sort[$i]; > my $mapping_search = $mapping_search[$i]; > > my $search_field = Koha::SearchFields->find({ name => $search_field_name }, { key => 'name' }); >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 603a9b7d0b..1990c52e6d 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 >@@ -383,9 +383,8 @@ a.add, a.delete { > </td> > <td> > <select data-id="mapping_sort"> >- <option value="undef">Undef</option> >- <option value="0">0</option> >- <option value="1">1</option> >+ <option value="0">No</option> >+ <option value="1">Yes</option> > </select> > </td> > <td> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34740
:
155337
|
155519
| 155764