[Bug 10843] New: print a slip can cause an error
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Bug ID: 10843 Summary: print a slip can cause an error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org Testing bug 10731, I found a bug: If the pref ReservesMaxPickUpDelay is not defined, C4::Letters::_parseletter raises an error in some cases. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 20909 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20909&action=edit Bug 10843: the DateTime->add method takes a scalar, not undef Test plan: 1) set an empty string for the ReservesMaxPickUpDelay pref 2) place a hold on an item 3) check in the item 4) click on "Print and confirm" 5) an error occurs 6) apply the patch 7) repeat steps 1 to 4 8) the error does not occur anymore. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gitbot@bugs.koha-community. | |org When did the bot| |2013-09-29 last check this| | --- Comment #2 from I'm just a bot <gitbot@bugs.koha-community.org> --- Patch applied cleanly, go forth and signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |srdjan@catalyst.net.nz --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Why // 0? An empty string would break it too, so I believe || 0 is better. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Srdjan Jankovic from comment #3)
Why // 0? An empty string would break it too, so I believe || 0 is better.
Yes, you are right! I will fix it. -- You are receiving this mail because: You are watching all bug changes.
The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20909|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21651 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21651&action=edit Bug 10843: the DateTime->add method takes a scalar, not undef Test plan: 1) set an empty string for the ReservesMaxPickUpDelay pref 2) place a hold on an item 3) check in the item 4) click on "Print and confirm" 5) an error occurs 6) apply the patch 7) repeat steps 1 to 4 8) the error does not occur anymore. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21651|0 |1 is obsolete| | --- Comment #6 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 21686 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21686&action=edit [SIGNED-OFF] Bug 10843: the DateTime->add method takes a scalar, not undef Test plan: 1) set an empty string for the ReservesMaxPickUpDelay pref 2) place a hold on an item 3) check in the item 4) click on "Print and confirm" 5) an error occurs 6) apply the patch 7) repeat steps 1 to 4 8) the error does not occur anymore. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The tests pass, but there are a lot of warnings. Could you take a look, Jonathan? Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 128. Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 133. Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 138. Use of uninitialized value $date_format in string eq at /home/katrin/kohaclone/Koha/DateUtils.pm line 67. Use of uninitialized value $date_format in string eq at /home/katrin/kohaclone/Koha/DateUtils.pm line 72. Use of uninitialized value $date_format in string eq at /home/katrin/kohaclone/Koha/DateUtils.pm line 77. Use of uninitialized value $date_format in string eq at /home/katrin/kohaclone/Koha/DateUtils.pm line 80. Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 128. Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 133. Use of uninitialized value $_ in pattern match (m//) at /home/katrin/kohaclone/Koha/DateUtils.pm line 138. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21686|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 21825 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21825&action=edit [PASSED QA] Bug 10843: the DateTime->add method takes a scalar, not undef Test plan: 1) set an empty string for the ReservesMaxPickUpDelay pref 2) place a hold on an item 3) check in the item 4) click on "Print and confirm" 5) an error occurs 6) apply the patch 7) repeat steps 1 to 4 8) the error does not occur anymore. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> An empty string didn't do it for me, I had to set the variable for the systempreference to NULL. I am not sure if this can happen when editing from the interface, but this change should not have any ill side effects and it has unit tests! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Depends on| |10298 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10843 Bug 10843 depends on bug 10298, which changed state. Bug 10298 Summary: t::lib::Mocks tries to deal with syspref but doesn not manage to http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10298 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org