Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1
authorNick Clemens <nick@bywatersolutions.com>
Thu, 7 Jan 2021 20:14:33 +0000 (20:14 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Mar 2021 12:50:03 +0000 (13:50 +0100)
commit9dd997e2d38a0ec07411166e5e497d48d95f9437
tree9c2b96c2eb23c4f6a1a0f66cea6a306c5ef71a0f
parent79064a88639ba725cc898cb940c85ff3fb1d4bee
Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1

This patch changes the interface to remove the undef option
We also update existing mappings and set default of 1

Comment previously indicated undef was treated differently, but in the code we treat undef as 1
That code is untoched to avoid creating problems for older mappings that may be reloaded

To test:
1 - View the ES mappings, note you can set columns to Undef, 0, 1
2 - Set some to undef
3 - Apply patches
4 - Update database
5 - Undef now show as 'Yes'
6 - Confirm you can set columns as Yes/no
7 - Confirm that mandatory columns display correct value when readonly (see issues field)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt