]> git.evergreen-ils.org Git - Evergreen.git/commit
Fix a data destruction bug when authorities are updated.
authorJason Stephenson <jstephenson@mvlc.org>
Fri, 11 Jan 2013 13:49:11 +0000 (08:49 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 11 Jan 2013 18:25:34 +0000 (13:25 -0500)
commit8b8f0a0e0a51a5321729cc1a58578099b33401fb
tree412d0ae4e6366acee97a5e50546a35d3ee0a4cdb
parent8b988e9da676b2b65b20c503197112a8ccef8d7a
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 and
strip_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.

Additionally, protect bib and authority template overlay functions
in the same manner.

Commit includes an upgrade script for this change as well as
for the previous commit's authority.generate_overlay_template fix.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Conflicts:
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Open-ILS/src/sql/Pg/upgrade/0750.function.authority.generate_overlay_template.sql [new file with mode: 0644]