From: dbs Date: Wed, 4 Nov 2009 05:49:12 +0000 (+0000) Subject: Adjust the leader/05 of records that have been deleted or undeleted X-Git-Tag: kcls-grey-screen-prod1~3100 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=609c8114752214bb5a98c844e609a396efd7f6fb;p=evergreen%2Fequinox.git Adjust the leader/05 of records that have been deleted or undeleted Complies with http://www.loc.gov/marc/bibliographic/bdleader.html git-svn-id: svn://svn.open-ils.org/ILS/trunk@14763 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm index f4ccd7c80b..4ed241f25e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm @@ -216,6 +216,11 @@ sub undelete_biblio_record_entry { $record->deleted('f'); $record->active('t'); + # Set the leader/05 to indicate that the record has been corrected/revised + my $marc = $record->marc(); + $marc =~ s{(.{5}).}{$1c}; + $record->marc($marc); + # no 2 non-deleted records can have the same tcn_value my $existing = $e->search_biblio_record_entry( { deleted => 'f', diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm index 3ad0343b45..dc06a9c067 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm @@ -312,6 +312,12 @@ sub delete_rec { $rec->active('f'); $rec->editor( $editor->requestor->id ); $rec->edit_date('now'); + + # Set the leader/05 to indicate that the record has been deleted + my $marc = $rec->marc(); + $marc =~ s{(.{5}).}{$1d}; + $rec->marc($marc); + $editor->update_biblio_record_entry($rec) or return $editor->event; return undef;