[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5375 (Update date/time last transaction (MARC 005) when saving authority record)
Nicole Engard
nengard at gmail.com
Thu Dec 16 17:12:02 CET 2010
Forgot sign off - resending.
On Wed, Dec 15, 2010 at 8:05 PM, Nicole Engard
<nengard at bywatersolutions.com> wrote:
> From: Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>
>
> Update 005 date/time when saving authority record for MARC21 and UNIMARC.
> ---
> C4/AuthoritiesMarc.pm | 16 ++++++++++------
> 1 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
> index d07cca4..9421be9 100644
> --- a/C4/AuthoritiesMarc.pm
> +++ b/C4/AuthoritiesMarc.pm
> @@ -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(
> --
> 1.5.6.5
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
More information about the Koha-patches
mailing list