Fix a data destruction bug when authorities are updated. collab/dyrcona/lp1081641_auth_overlay_fixes
authorJason Stephenson <jstephenson@mvlc.org>
Fri, 11 Jan 2013 14:22:05 +0000 (09:22 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 11 Jan 2013 14:25:27 +0000 (09:25 -0500)
commit8ba0246be6a072e8644eb81f4717ff46ded0aa41
treee44ab6ec1b1bd88f5f6e878977fbd2cb20b9dbc7
parent972fdaeed65ba8abbba670692dd8511855a5e0da
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.sql [new file with mode: 0644]