[Bug 21620] New: Errors when using email from stockrotation.pl cronjob
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Bug ID: 21620 Summary: Errors when using email from stockrotation.pl cronjob Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com There is superfluous use of sprintf within the stockrotation cronjob and it looks like at least one use got rebased incorrectly and was not caught by testing or qa. -- 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=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11897 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11897 [Bug 11897] Stock Rotation for Koha -- 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=21620 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 80934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80934&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=mail --send-email --execute` 4) Note the lack of errors -- 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=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major -- 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=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- 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=21620 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80934|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 80935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80935&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=mail --send-email --execute` 4) Note the lack of errors Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I cannot test this because of bug 11897 comment 366: % perl misc/cronjobs/stockrotation.pl --report=email --send-email --execute ERROR PROCESSING TEMPLATE: file error - parse error - input text line 5: unexpected token (ne) [% IF item.reason ne 'in-demand' %] at misc/cronjobs/stockrotation.pl line 343. Also note that the test plan is wrong, the correct value for --report is 'email', not 'mail' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_18_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80935|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81055&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=mail --send-email --execute` 4) Note the lack of errors Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81056&action=edit Bug 21620: (follow-up) Fix for bad TT syntax in default notice. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Grr... silly template toolkit syntax error.. I think that followup should resolve it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Martin Renvoize from comment #5)
Created attachment 81056 [details] [review] Bug 21620: (follow-up) Fix for bad TT syntax in default notice.
Nope, you should fix other languages as well. Maybe doing it on a separate bug report would be better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81056|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81108 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81108&action=edit Bug 21620: (follow-up) Fix for bad TT syntax in default notice. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|11897 |21656 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11897 [Bug 11897] Stock Rotation for Koha https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21656 [Bug 21656] Syntax Error in Stock Rotation Default Notice Template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81055|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81110&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=mail --send-email --execute` 4) Note the lack of errors Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81108|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81110|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81111&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=email --send-email --execute` 4) Note the lack of errors Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As requested I've moved the followup patch to a second bug and committed the missing changes to it there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 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=21620 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81111|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 81872 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81872&action=edit Bug 21620: Prevent stockrotation cronjob failures Superflous use of sprintf combined with rebasing issue left the stockrotation cronjob such that a 'No action taken' email report would catastrophically fail with the error: Redundant argument in sprintf at ./stockrotation.pl line 316 This patch both resolves the error and cleans up some additional unrequired sprintf usage. Test Plan 1) Create a rotation plan 2) Add some items to the rotation plan 3) Run the cronjob using `stockrotation.pl --report=email --send-email --execute` 4) Note the lack of errors Signed-off-by: Mark Tompsett <mtompset@hotmail.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=21620 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Bug 21620 depends on bug 21656, which changed state. Bug 21656 Summary: Syntax Error in Stock Rotation Default Notice Template https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21656 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Bug 21656 not in 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org