From 2a80cc37236c50d1ca1f21cd1e69c3658c55d083 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 30 Mar 2016 16:43:32 -0400 Subject: [PATCH] Process ebrary records for microform weirdness For unknown reasons, many of the ProQuest records included a malformed 008 that ended up identifying the item as a microform item, and throwing off the language coding. Signed-off-by: Dan Scott --- Open-ILS/src/sql/Pg/update_marc_records_in_database.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Open-ILS/src/sql/Pg/update_marc_records_in_database.sql b/Open-ILS/src/sql/Pg/update_marc_records_in_database.sql index f7f8cab53c..3e116cfff4 100644 --- a/Open-ILS/src/sql/Pg/update_marc_records_in_database.sql +++ b/Open-ILS/src/sql/Pg/update_marc_records_in_database.sql @@ -75,6 +75,20 @@ foreach my $ocho (@eights) { } elsif ($uri =~ m#sagepub#) { $ocho->update('y' => 'Available online / disponible en ligne (Sage)'); $ocho->delete_subfield(code => 'z', match => qr/Available/); + } elsif ($uri =~ m#ebrary#) { + $ocho->update('y' => 'Available online / disponible en ligne (ebrary)'); + $ocho->delete_subfield(code => 'z', match => qr/Available/); + + # Fix microform weirdness in ebrary records + my $ff = $record->field('008'); + if ($ff) { + my $ffd = $ff->data(); + my $fff = substr($ffd, 23, 1); + if ($fff == 'b') { + my $newff = substr($ffd, 0, 22) . ' s ' . substr($ffd, 24); + $ff->update($newff); + } + } } } -- 2.11.0