Bugzilla – Attachment 122870 Details for
Bug 28533
Requesting whole field in 'itemcallnumber' system preference causes internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr system preference
Bug-28533-Set-subfields-to-undef-if-whole-field-re.patch (text/plain), 1.86 KB, created by
Marcel de Rooy
on 2021-07-16 06:59:42 UTC
(
hide
)
Description:
Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr system preference
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-07-16 06:59:42 UTC
Size:
1.86 KB
patch
obsolete
>From 9ad578a3c5e2677de1a2099cf72d9c6e35b4b10f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 9 Jun 2021 12:59:27 +0000 >Subject: [PATCH] Bug 28533: Set subfields to 'undef' if whole field request in > itemcallnumebr system preference >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >This patch undefines the CNsubfields variable when the whole field is requested > >Note that the substr returns '' when no characters are found, so we test if the string eq '' > >Testing 'truth' doesn't work because "0" is a valid option > >To test: > 1 - Edit a record, add an 082 field > 082 0 0 â¡aalphaâ¡bbetaâ¡0delta > 2 - Set itemcallnumber system preference to 082 > 3 - Attempt to add/edit items > 4 - ISE > 5 - Apply patch, restart all the things > 6 - Add/edit items - no error > 7 - Confirm the itemcallnumber field is populated with "alpha beta delta" > 8 - Set itemcallnumber system preference to '0820' > 9 - Add/edit items >10 - Confirm itemcallnumber is populated with 'delta' > >Signed-off-by: Salman Ali <salman.ali@inLibro.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > cataloguing/additem.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index b1e0357398..1d8323b2f5 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -144,6 +144,7 @@ sub generate_subfield_form { > foreach my $pref_itemcallnumber_part (split(/,/, $pref_itemcallnumber)){ > my $CNtag = substr( $pref_itemcallnumber_part, 0, 3 ); # 3-digit tag number > my $CNsubfields = substr( $pref_itemcallnumber_part, 3 ); # Any and all subfields >+ $CNsubfields = undef if $CNsubfields eq ''; > my $temp2 = $temp->field($CNtag); > > next unless $temp2; >-- >2.20.1
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 28533
:
121738
|
121808
| 122870 |
123343