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 commit5f6e1a1cf7
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commita9b76c2254
) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
f2e1e413cc
commit
fe48529cc9
2 changed files with 3 additions and 4 deletions
|
@ -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' });
|
||||
|
|
|
@ -379,9 +379,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>
|
||||
|
|
Loading…
Reference in a new issue