Modified authority.indexing_ingest_or_delete to update MARC data
authorLiam Whalen <lwhalen@nrcan-rncan.gc.ca>
Thu, 3 Nov 2011 20:53:57 +0000 (16:53 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 4 Nov 2011 14:18:24 +0000 (10:18 -0400)
The authority.indexing_ingest_or_delete trigger in the update script
was missing a call to authority.propagate_changes which is responsible
for updating the MARC data of records affected by an auhtority merge.
This patch adds the call to authority.propagate_changes as it appears
in the authority.indexing_ingest_or_delete trigger from the file
999.functions.global.sql.

Signed-off-by: Liam Whalen <lwhalen@nrcan-rncan.gc.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql

index 1302226..467b7bb 100644 (file)
@@ -11075,6 +11075,8 @@ BEGIN
         IF NOT FOUND AND OLD.marc = NEW.marc THEN -- don't do anything if the MARC didn't change
             RETURN NEW;
         END IF;
+        -- Propagate these updates to any linked bib records
+        PERFORM authority.propagate_changes(NEW.id) FROM authority.record_entry WHERE id = NEW.id;
     END IF;
 
     -- Record authority linking