Bug 21708: Sort MARC fields in TransformHtmlToMarc

Instead of pushing 999 in the front :)

Test plan:
Do not yet apply this patch.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field (MARC21 999) follows leader.
Apply this patch. Restart Plack.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field is in right position.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t. Should pass now.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6cb9b3634d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2020-03-10 15:11:07 +00:00 committed by Lucas Gass
parent 198484d3b9
commit ee5ecb043e
1 changed files with 1 additions and 0 deletions

View File

@ -2378,6 +2378,7 @@ sub TransformHtmlToMarc {
}
}
@fields = sort { $a->tag() cmp $b->tag() } @fields;
$record->append_fields(@fields);
return $record;
}