Bug 5684 : Remove all items fields from a Z39.50 record imported for acquisition.
authorFrédérick Capovilla <frederick.capovilla@sys-tech.net>
Mon, 28 Mar 2011 16:09:23 +0000 (12:09 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 12 Jun 2011 23:21:13 +0000 (11:21 +1200)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
acqui/neworderempty.pl

index 386dda7..bd06b0c 100755 (executable)
@@ -132,6 +132,11 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){
     my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'});
     die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
 
+    # Remove all the items (952) from the imported record
+    foreach my $item ($marcrecord->field('952')) {
+        $marcrecord->delete_field($item);
+    }
+
     my $duplicatetitle;
 #look for duplicates
     ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord);