From 1b7b35b9ccbf59d0f96b4f78cb9e2273ff0c26d5 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 1 Oct 2009 17:24:53 +0200 Subject: [PATCH] (bug #3688) add index for acqdate in unimarc and fix maintenance script This patch add the support of acqdate in unimarc, and fix maintenance script for brokend records. --- etc/zebradb/marc_defs/unimarc/biblios/record.abs | 2 +- misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index ac7c069856..6188c6adfc 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -24,7 +24,7 @@ all any melm 001 Local-number,Local-number:n # Local-number (biblionumber can be either in 090$9 or, on some setup, on 001) melm 090$9 Local-number,Local-number:n -melm 099$c date-entered-on-file:s,date-entered-on-file:n,date-entered-on-file:y +melm 099$c date-entered-on-file:s,date-entered-on-file:n,date-entered-on-file:y,Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s melm 099$d Date/time-last-modified:s,Date/time-last-modified:n,Date/time-last-modified:y diff --git a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl b/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl index 3aef5c6cbe..43b5550a10 100755 --- a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl +++ b/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl @@ -20,6 +20,8 @@ sub updateMarc { my $field; my $biblio = GetMarcBiblio($id); + return unless $biblio; + if(!$biblio->field('099')) { $field = new MARC::Field('099','','', -- 2.39.5