LP#1878984: Fix Preserve specification user/miker/lp-1878984-vandelay-preserve
authorMike Rylander <mrylander@gmail.com>
Mon, 26 Oct 2020 20:28:24 +0000 (16:28 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 26 Oct 2020 20:30:28 +0000 (16:30 -0400)
commitb000ff1c5ea1f6d52e2d651d7f39452cb33796bf
tree46d695f942218039d643b1b2b22d6b1b886091d7
parent9b89185e24432b78315283fc35e26a852386a08c
LP#1878984: Fix Preserve specification

When processing a Preserve specification, vandelay.replace_field fails
to account for the situation where the target record does not have any
instances of the field to be preserved.  This commit copies fields from
the source to the target when there are no like target fields and the
source fields are not restricted by a match requirement.

It additionally adds multi-subfield match requirement capabilities to
the add_field and replace_field functions, as implemented in the branch
submitted for LP#1901597 that does the same for strip_field.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.function.vandelay_replace_field.sql [new file with mode: 0644]