From 36e664a7366f7efbce4cc6d3630239ff17dfc232 Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 2 Mar 2010 20:54:37 +0000 Subject: [PATCH] Apply patch from Galen Charlton to prevent legacy 852 fields from being exported during bib+holdings export From https://bugs.launchpad.net/evergreen/+bug/528424 git-svn-id: svn://svn.open-ils.org/ILS/trunk@15661 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm | 1 + Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index 4374b66d04..623b34d9cd 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -232,6 +232,7 @@ sub handler { if ($holdings) { + $req->delete_field( $_ ) for ($req->field('852')); # remove any legacy 852s my $cn_list = $bib->call_numbers; if ($cn_list && @$cn_list) { diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index f428b69bdd..736a9433f8 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -1740,6 +1740,7 @@ sub sru_search { MARC::Field->new( '001', $record->id ) ); } + $marc->delete_field($_) for ($marc->field('852')); # remove any legacy 852s foreach my $cn (keys %$bib_holdings) { foreach my $cp (@{$bib_holdings->{$cn}->{'copies'}}) { $marc->insert_fields_ordered( -- 2.11.0