Bug 5375 (Update date/time last transaction (MARC 005) when saving authority record)

Update 005 date/time when saving authority record for MARC21 and UNIMARC.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Marcel de Rooy 2010-12-15 20:12:28 -05:00 committed by Chris Cormack
parent 76338220dd
commit 1190833149

View file

@ -610,6 +610,16 @@ sub AddAuthority {
$format= 'MARC21';
}
#update date/time to 005 for marc and unimarc
my $time=POSIX::strftime("%Y%m%d%H%M%S",localtime);
my $f5=$record->field('005');
if (!$f5) {
$record->insert_fields_ordered( MARC::Field->new('005',$time.".0") );
}
else {
$f5->update($time.".0");
}
if ($format eq "MARC21") {
if (!$record->leader) {
$record->leader($leader);
@ -619,12 +629,6 @@ sub AddAuthority {
MARC::Field->new('003',C4::Context->preference('MARCOrgCode'))
);
}
my $time=POSIX::strftime("%Y%m%d%H%M%S",localtime);
if (!$record->field('005')) {
$record->insert_fields_ordered(
MARC::Field->new('005',$time.".0")
);
}
my $date=POSIX::strftime("%y%m%d",localtime);
if (!$record->field('008')) {
$record->insert_fields_ordered(