Bugzilla – Attachment 164802 Details for
Bug 36552
Update record 'date entered on file' when duplicating a record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36552: (QA follow-up) Add a theoretical check on $record
Bug-36552-QA-follow-up-Add-a-theoretical-check-on-.patch (text/plain), 1.56 KB, created by
Marcel de Rooy
on 2024-04-12 08:12:46 UTC
(
hide
)
Description:
Bug 36552: (QA follow-up) Add a theoretical check on $record
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-12 08:12:46 UTC
Size:
1.56 KB
patch
obsolete
>From acf111399aec8e7700ce36460ba7a1a1ff9c7e8b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 12 Apr 2024 08:10:18 +0000 >Subject: [PATCH] Bug 36552: (QA follow-up) Add a theoretical check on $record >Content-Type: text/plain; charset=utf-8 > >Theoretically, it might be empty? Note the check too in the >other script. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > authorities/authorities.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index c1d4a04cca..462098bc1e 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -639,12 +639,12 @@ if ($op eq "cud-add") { > } else { > if ( $op eq "duplicate" ) { > $authid = ""; >- if ( C4::Context->preference('marcflavour') eq 'MARC21' && $record->field('008') ) { >+ if ( C4::Context->preference('marcflavour') eq 'MARC21' && $record && $record->field('008') ) { > my $s008 = $record->field('008')->data; > my $date = POSIX::strftime( "%y%m%d", localtime ); > substr( $s008, 0, 6, $date ); > $record->field('008')->update($s008); >- } elsif ( C4::Context->preference('marcflavour') eq 'UNIMARC' && $record->subfield( '100', 'a' ) ) { >+ } elsif ( C4::Context->preference('marcflavour') eq 'UNIMARC' && $record && $record->subfield( '100', 'a' ) ) { > my $s100a = $record->subfield( '100', 'a' ); > my $date = POSIX::strftime( "%Y%m%d", localtime ); > substr( $s100a, 0, 8, $date ); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36552
:
164556
|
164687
|
164800
|
164801
| 164802