[Bug 20937] New: PrintNoticesMaxLines is not effective for overdue notices with a print type specified where a patron has an email
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Bug ID: 20937 Summary: PrintNoticesMaxLines is not effective for overdue notices with a print type specified where a patron has an email Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The logic in the script is: if ( ( scalar(@emails_to_use) == 0 || $nomail ) && $PrintNoticesMaxLines && $j
= $PrintNoticesMaxLines )
So if we don't pass 'nomail' and the patron has an email, the items don't get kicked out. -- 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=20937 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=20937 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 76044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76044&action=edit Bug 20937: Truncate items for print notices when user has an email To test: 1 - Set PrintNotciesMaxLines to 1 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a notice 3 - Make sure the patron has an email 4 - Make sure the notice you are sending is set to 'print' as the type 5 - Run overdue_notices.pl without the 'nomail' option 6 - Find the message and note all items have been added 7 - Apply patch 8 - Clear the message queue 9 - Re-run overdue_notices.pl 10 - Confirm the message now has only 1 item. -- 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=20937 Chris Slone <cslone@camdencountylibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cslone@camdencountylibrary. | |org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 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=20937 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76044|0 |1 is obsolete| | --- Comment #2 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 83829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83829&action=edit Bug 20937: Truncate items for print notices when user has an email To test: 1 - Set PrintNotciesMaxLines to 1 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a notice 3 - Make sure the patron has an email 4 - Make sure the notice you are sending is set to 'print' as the type 5 - Run overdue_notices.pl without the 'nomail' option 6 - Find the message and note all items have been added 7 - Apply patch 8 - Clear the message queue 9 - Re-run overdue_notices.pl 10 - Confirm the message now has only 1 item. Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.farmer@inlibro.com --- Comment #3 from Charles Farmer <charles.farmer@inlibro.com> --- Test plan made it easy to reproduce, patch works has expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |pierre-marc.thibault@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 83829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83829 Bug 20937: Truncate items for print notices when user has an email Review of attachment 83829: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20937&attachment=83829) ----------------------------------------------------------------- ::: misc/cronjobs/overdue_notices.pl @@ +683,4 @@
# email or sms is requested but not exist, do a print. $effective_mtt = 'print'; } + my @notice_items = @items;
Why a new variable? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83829|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 85790 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85790&action=edit Bug 20937: Truncate items for print notices when user has an email To test: 1 - Set PrintNoticesMaxLines to 1 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a notice 3 - Make sure the patron has an email 4 - Make sure the notice you are sending is set to 'print' as the type 5 - Run overdue_notices.pl without the 'nomail' option 6 - Find the message and note all items have been added 7 - Apply patch 8 - Clear the message queue 9 - Re-run overdue_notices.pl 10 - Confirm the message now has only 1 item. 11 - Set PrintNoticesMaxLines to 0 12 - Clear the message queue 13 - Re-run overdue_notices.pl 14 - Confirm the message has 2 items as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #4)
Why a new variable?
I wasn't sure if it was used elsewhere in the script - it does not appear to be, removed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85790|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 87581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87581&action=edit Bug 20937: Truncate items for print notices when user has an email To test: 1 - Set PrintNoticesMaxLines to 1 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a notice 3 - Make sure the patron has an email 4 - Make sure the notice you are sending is set to 'print' as the type 5 - Run overdue_notices.pl without the 'nomail' option 6 - Find the message and note all items have been added 7 - Apply patch 8 - Clear the message queue 9 - Re-run overdue_notices.pl 10 - Confirm the message now has only 1 item. 11 - Set PrintNoticesMaxLines to 0 12 - Clear the message queue 13 - Re-run overdue_notices.pl 14 - Confirm the message has 2 items as expected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as intended, signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=20937 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87581|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 87592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87592&action=edit Bug 20937: Truncate items for print notices when user has an email To test: 1 - Set PrintNoticesMaxLines to 1 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a notice 3 - Make sure the patron has an email 4 - Make sure the notice you are sending is set to 'print' as the type 5 - Run overdue_notices.pl without the 'nomail' option 6 - Find the message and note all items have been added 7 - Apply patch 8 - Clear the message queue 9 - Re-run overdue_notices.pl 10 - Confirm the message now has only 1 item. 11 - Set PrintNoticesMaxLines to 0 12 - Clear the message queue 13 - Re-run overdue_notices.pl 14 - Confirm the message has 2 items as expected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.05.00, 18.11.05 released in| | Status|Pushed to Master |Pushed to Stable --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20937 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 18.05.x for 18.05.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org