[Koha-bugs] [Bug 17913] Merge three authority merge fixes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 17 08:44:10 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17913

--- Comment #6 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 59065
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59065&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.

Test plan:
Run t/db_dependent/Authorities/Merge.t

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list