Bug 23204: Fix ordering of fields in exported file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
0c9585333d
commit
e578d0b36b
|
|
@ -267,7 +267,7 @@ sub raw_elasticsearch_mappings {
|
|||
{ search_field_id => $search_field->id },
|
||||
{
|
||||
join => 'search_marc_map',
|
||||
order_by => { -asc => 'search_marc_map.marc_field' }
|
||||
order_by => { -asc => ['search_marc_map.marc_type','search_marc_map.marc_field'] }
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -279,8 +279,8 @@ sub raw_elasticsearch_mappings {
|
|||
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{label} = $search_field->label;
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type;
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order;
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight || undef;
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order;
|
||||
$mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight;
|
||||
|
||||
push (@{ $mappings->{ $marc_map->index_name }{ $search_field->name }{mappings} },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
$DBversion = 'XXX';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE search_marc_map CHANGE marc_type `marc_type` enum('marc21','normarc','unimarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for';
|
||||
});
|
||||
NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting");
|
||||
}
|
||||
Loading…
Reference in New Issue