From 7f252a2b3f8ecbff58d553285b059d3a6e1145f5 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 13 Dec 2007 18:21:55 -0600 Subject: [PATCH] AddAuthority, adding 100 field for UNIMARC if it's not provided Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- C4/AuthoritiesMarc.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index d0af4e64b4..e336026b63 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -509,6 +509,18 @@ sub AddAuthority { $record->delete_field($record->field('001')); $record->insert_fields_ordered(MARC::Field->new('001',$authid)); } + if (($format eq "UNIMARCAUTH") && (!$record->subfield('100','a'))){ + $record->leader(" nx j22 "); + my $date=POSIX::strftime("%Y%m%d",localtime); + if ($record->field('100')){ + $record->field('100')->update('a'=>$date."afrey50 ba0"); + } else { + $record->append_fields( + MARC::Field->new('100',' ',' ' + ,'a'=>$date."afrey50 ba0") + ); + } + } $record->add_fields('152','','','b'=>$authtypecode) unless $record->field('152'); # warn $record->as_formatted; $dbh->do("lock tables auth_header WRITE"); -- 2.39.5