Fix a data destruction bug when authorities are updated. user/dyrcona/lp1081641
authorJason Stephenson <jstephenson@mvlc.org>
Thu, 3 Jan 2013 18:27:27 +0000 (13:27 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Thu, 3 Jan 2013 18:27:27 +0000 (13:27 -0500)
commite3f63b9606dbd2e7aeb1e91150e13236dda35106
treedba01b5645e41c357f8f4d77c695b1d8a3c9e770
parent0cdae03f4029b3a66bda80f7d94fd3072c305db1
Fix a data destruction bug when authorities are updated.

Modify the two-argument form of vandelay.merge_record_xml to return
the target_marc when the add_rule, preserve_rule, replace_rule are
all empty.

This method is used by authority.propagate_changes and would replace
the bibliographic record's marc with the overlay template when the
above would happen. By returning the biblographic record entry's own
marc in that case, we prevent data destruction.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.function.vandelay_merge_record_xml_bib_destruction_fix.sql [new file with mode: 0644]