[open-ils-commits] r10998 - branches/rel_1_4/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Oct 30 16:14:36 EDT 2008
Author: miker
Date: 2008-10-30 16:14:32 -0400 (Thu, 30 Oct 2008)
New Revision: 10998
Modified:
branches/rel_1_4/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
Log:
add item barcode match as an optional incoming matchpoint
Modified: branches/rel_1_4/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
===================================================================
--- branches/rel_1_4/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2008-10-30 20:11:51 UTC (rev 10997)
+++ branches/rel_1_4/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2008-10-30 20:14:32 UTC (rev 10998)
@@ -534,6 +534,17 @@
INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES ('tcn_value', attr.id, NEW.id, eg_rec.id);
END LOOP;
+ -- check for a direct item barcode match
+ FOR eg_rec IN
+ SELECT DISTINCT b.*
+ FROM biblio.record_entry b
+ JOIN asset.call_number cn ON (cn.record = b.id)
+ JOIN asset.copy cp ON (cp.call_number = cn.id)
+ WHERE cp.barcode = attr.attr_value AND cp.deleted IS FALSE
+ LOOP
+ INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES ('id', attr.id, NEW.id, eg_rec.id);
+ END LOOP;
+
END LOOP;
RETURN NULL;
More information about the open-ils-commits
mailing list