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)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Fri, 16 Dec 2022 14:31:51 +0000 (15:31 +0100)
commitcbd00bc2fc883e3c3c4f4018b9a084b6c5745c0e
tree43be6b9d1dc1a12e97daa3af63112504c70ed851
parentfcd9c93caf7f2fa6740c4966c0cf56e86ff83cf4
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>
(cherry picked from commit 74742f52768b22c9e49ba0a8407fdb0ea95f3251)
(cherry picked from commit 98fe1f204a7bc2193d288f62038dfb6ffe9c07be)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
t/db_dependent/MarcModificationTemplates.t