]> git.koha-community.org Git - koha.git/commit
Bug 34740: Update sort options in ES config to by Yes/No
authorNick Clemens <nick@bywatersolutions.com>
Thu, 7 Sep 2023 17:13:46 +0000 (17:13 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 18 Sep 2023 21:50:43 +0000 (11:50 -1000)
commita9b76c2254d1f5a1823fdf9f444fc70052ff3e7a
treeee07c6c8db9f62f869ff2d8b21c57b66b147dd28
parentc8cec2c52f03a844b23ff7310bda5a6d11e987ca
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f6e1a1cf77dfc893de08b66840f2ea16abf1998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/searchengine/elasticsearch/mappings.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt