https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17913
Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59065|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> --- Created attachment 59066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59066&action=edit Bug 17913: Fix the new field tag in merge when changing type Originally aimed for 9988, adjusted for this report. Old behavior was: pick the first tag. This is definitely wrong. If you (would) merge 610 to 611, you don't want to get a 111. This patch resolves the problem by determining the new tag in a small helper routine _merge_newtag, and corrects the position of the new field in the MARC record with append_fields_ordered. Too bad that MARC::Record does not have such a function; it looks like insert_fields_ordered, but it is different in case of multiple fields with the same tag. Note: These two small helper functions are not tested separately, since they should not be called outside of merge. They are implicitly tested by the adjusted tests in Merge.t. Note: In adding tests for this fix, I chose to simplify compare_field_count (no need for the pass parameter), and replace the pass parameter of sub compare_field_order by an exclude parameter, a hash of fields to exclude in counting fields. Test plan: Run t/db_dependent/Authorities/Merge.t Signed-off-by: Marcel de Rooy <m.de.r...@rijksmuseum.nl> -- 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/