[Bug 35171] New: runreport.pl cronjob should optionally send an email when the report has no results
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Bug ID: 35171 Summary: runreport.pl cronjob should optionally send an email when the report has no results Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Some libraries would like to know that a report was run overnight, even if there were no results. We should allow this as an optional feature. -- 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=35171 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=35171 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 157944 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157944&action=edit Bug 35171: Add send_empty option to runreport This patch adds a new 'send_empty' option to runreport.pl To test: 1 - Create a report in Koha that will not return any results: SELECT barcode FROM items WHERE 1=2 2 - perl misc/cronjobs/runreport.pl 1 3 - Output is: NO OUTPUT: 0 results from execute_query 4 - perl misc/cronjobs/runreport.pl 1 --send_empty 5 - Output is: no results were returned for the report 6 - perl misc/cronjobs/runreport.pl 1 --send_empty --email 7 - It will die on an email error unless you have SMTP configured - this si good, it means we sent an email 8 - Bonus points: Test on a system that can correctly send emails, confirm it works :-) -- 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=35171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=35171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157944|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 158016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158016&action=edit Bug 35171: Add send_empty option to runreport This patch adds a new 'send_empty' option to runreport.pl To test: 1 - Create a report in Koha that will not return any results: SELECT barcode FROM items WHERE 1=2 2 - perl misc/cronjobs/runreport.pl 1 3 - Output is: NO OUTPUT: 0 results from execute_query 4 - perl misc/cronjobs/runreport.pl 1 --send_empty 5 - Output is: no results were returned for the report 6 - perl misc/cronjobs/runreport.pl 1 --send_empty --email 7 - It will die on an email error unless you have SMTP configured - this si good, it means we sent an email 8 - Bonus points: Test on a system that can correctly send emails, confirm it works :-) Signed-off-by: David Nind <david@davidnind.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=35171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. I tested using email, and the email message was received 1. To test sending emails using a Google account, set up an APP password for your Google account, edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where <user_name> = your Google email address; <password> = your APP password, not your Google account password): <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>GOOGLEACCOUNTUSER</user_name> <password>GOOGLEAPPPASSWORD</password> <debug>1</debug> </smtp_server> 2. Change the KohaAdminEmailAddress system preference to a valid email address that you have access to. 3. Run flush_memcached and restart_all -- 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=35171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a new release notes| |'send_empty' option to | |runreport.pl. Currently, if | |there are no results for a | |report, then no email is | |sent. This option lets | |libraries know that a | |report was run overnight | |and that it had no results. | |Example: perl | |misc/cronjobs/runreport.pl | |1 --send_empty --email -- 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=35171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=35171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158016|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 158102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158102&action=edit Bug 35171: Add send_empty option to runreport This patch adds a new 'send_empty' option to runreport.pl To test: 1 - Create a report in Koha that will not return any results: SELECT barcode FROM items WHERE 1=2 2 - perl misc/cronjobs/runreport.pl 1 3 - Output is: NO OUTPUT: 0 results from execute_query 4 - perl misc/cronjobs/runreport.pl 1 --send_empty 5 - Output is: no results were returned for the report 6 - perl misc/cronjobs/runreport.pl 1 --send_empty --email 7 - It will die on an email error unless you have SMTP configured - this si good, it means we sent an email 8 - Bonus points: Test on a system that can correctly send emails, confirm it works :-) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 158103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158103&action=edit Bug 35171: (QA follow-up): tidy up POD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Signed Off |Passed QA --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks David for the complete test :) Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.06 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m Status|Pushed to stable |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35171 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Documentation| |Caroline Cyr La Rose contact| | Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/795 CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org