[Bug 28533] New: Requesting whole field in 'itemcallnumber' system preference causes internal server error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Bug ID: 28533 Summary: Requesting whole field in 'itemcallnumber' system preference causes internal server error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl To recreate: 1 - Set 'itemcallnumber' system preference to 082 2 - Find/Create a record with an 082 field 3 - Add items to the record 4 - Error: Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE ]$/ at /usr/share/perl5/MARC/Field.pm line 643. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121738 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121738&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' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Salman Ali <salman.ali@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121738|0 |1 is obsolete| | --- Comment #2 from Salman Ali <salman.ali@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@outaouais> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Salman Ali <salman.ali@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |salman.ali@inLibro.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- * Signed-off-by line 'Signed-off-by: Salman Ali <salman@outaouais>' seems invalid -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hmm who invented this variable name :) my $temp = GetMarcBiblio({ biblionumber => $biblionumber }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #0)
Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE ]$/ at /usr/share/perl5/MARC/Field.pm line 643.
Looks like Galen has a problem too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121808|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122870&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.ali@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |jonathan.druart+koha@gmail. | |com --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Same code in C4::Items::PrepareItemrecordDisplay. It certainly needs to be adjusted too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123343&action=edit Bug 28533: Fix other ocurrence -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|21.11.00 |21.11.00,21.05.03 released in| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.11.00,21.05.03 |21.11.00,21.05.03,20.11.09 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28533 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- [Just saying... Got a conflict with this patch when rebasing bug 28533. It clearly shows that the work done is very useful: 1. the need to centralize the code and 2. have test coverage for ANY changes we are making there.] -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org