Bug 31644: Add copy test and clarify some functions
authorNick Clemens <nick@bywatersolutions.com>
Thu, 29 Sep 2022 16:13:10 +0000 (16:13 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Oct 2022 14:53:19 +0000 (11:53 -0300)
commit74742f52768b22c9e49ba0a8407fdb0ea95f3251
treea38fec4f44f4bcf0f7d95d31a77b9cd937da7387
parent2f61afa9c502874ed98e9cc67f6b99d6365bbf95
Bug 31644: Add copy test and clarify some functions

This patch adds a tst for copy without subfields. I also clarify what eachstep does
so the next user/coder understands current behaviour

Update existing or add new: In the case where the field/subfield exists
we update, if we have two fields - one with the subfield, and one without, we
add the subfield to the one without

Copy field:
 - If given a subfield - we will add to existing fields in the record
 - If not given a subfield - we create an entirely new field

The logic of all of this is tricky, makes sense in a certain light, any complaints
are for a new bug :-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/MarcModificationTemplates.t