Bail if 035a already present in record. user/jason@mvlc.org/maintain_control_numbers
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 13 Jun 2011 18:36:06 +0000 (14:36 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 13 Jun 2011 18:36:06 +0000 (14:36 -0400)
Return from maintain_control_numbers if the record already has a
035 subfield a. This combination is not repeatable per MARC:
http://www.loc.gov/marc/bibliographic/concise/bd035.html

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/sql/Pg/002.functions.config.sql

index 56a3df8..1be7dd8 100644 (file)
@@ -532,6 +532,10 @@ if ($ous_rv->{processed}) {
 
 my ($create, $munge) = (0, 0);
 
+# 035a is not repeatable per MARC standard, so bail if we already got
+# one.
+return if ($record->field('035', 'a');
+
 my @scns = $record->field('035');
 
 foreach my $id_field ('001', '003') {