Bug 17913: Do not keep a cleared subfield in loose merge mode
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 17 Jan 2017 08:32:44 +0000 (09:32 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 20 Jan 2017 13:55:11 +0000 (13:55 +0000)
commit681ae8430e60fd0c97ea0652b02ee3daf849ed5d
treecc644fdcecc4b68c9aba92e8ffa2c807ed5446d8
parent8cde85451e3bae584ed1838efcaa4085cb656dfe
Bug 17913: Do not keep a cleared subfield in loose merge mode

If you modify an authority and clear a specific subfield, you expect that
merge respects your edit and clears this subfield too in the biblio
records. It does in the new strict mode, but it does not yet in the
default loose mode.

This patch fixes that by adjusting the code around $exclude so that it
uses a new hash skip_subfields, built from the reporting tags from the old
and the new authority record.

This is supported again by some changes in the unit test.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/AuthoritiesMarc.pm
t/db_dependent/Authorities/Merge.t