[Koha-bugs] [Bug 28533] Requesting whole field in 'itemcallnumber' system preference causes internal server error
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 10 20:59:05 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533
Salman Ali <salman.ali at inLibro.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #121738|0 |1
is obsolete| |
--- Comment #2 from Salman Ali <salman.ali at inLibro.com> ---
Created attachment 121808
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121808&action=edit
Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr
system preference
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 at outaouais>
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list