https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18458
--- Comment #12 from Josef Moravec <josef.mora...@gmail.com> --- Created attachment 70105 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70105&action=edit Bug 18458: Merging authority record incorrectly orders subfields While doing a merge, if a subfield(s) precedes the controlled subfields (like $i before $a in 7XX, which comes before $a -- rare but will become more and more usual) after merging will be moved to the end. This is not right. The patch (with AuthorityMergeMode == loose) make merge consider the subfields order: all subfields which originally were found before the first controlled subfield (e.g. $i before $a in 7XX / MARC 21) will remain in the front, the rest of not controlled subfields that should remain in the field will come after the subfields copied from authority rec. As a bonus, $9 will be placed at the end. To test: 0) Have AuthorityMergeMode == loose; 1) Have some field in bibliorecord, controlled by an authority, with extra subfield(s) (i.e. not present in authority rec.) placed at the beginning of the field; 2) Open (not necessarily edit) and save the connected authority; 3) See that the extra subfieds were moved to the end of the field (and $9 is in the front); 4) Apply the patch; 5) Reorder subfields in biblio field; 6) Open (not necessarily edit) and save the connected authority; 7) See that the order has been conserved, additionally $9 the last subfield in the field. Signed-off-by: Marcel de Rooy <m.de.r...@rijksmuseum.nl> Amended: Moved field creation to its original place. Changed $9 handling. Simplified the following add_subfields for loop. Edited comments. Restored the append_fields_ordered call (see comment6). With this patch, the Merge.t test now passes. Signed-off-by: Josef Moravec <josef.mora...@gmail.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/