[Bug 28474] New: Pass process_message_queue.pl params to before_send_messages plugin hooks
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Bug ID: 28474 Summary: Pass process_message_queue.pl params to before_send_messages plugin hooks Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters. -- 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=28474 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@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=28474 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 121452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121452&action=edit Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters. Test Plan: 1) Apply this patch 2) Install Kitchen Sink plugin v2.2.0 or later https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/do... 3) Run misc/cronjobs/process_message_queue.pl with any or all non-email related paramters 4) Note the plugin output shows the parameters were passed to the plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Andrew Fuerste-Henry <andrew@bywatersolutions.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=28474 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121452|0 |1 is obsolete| | --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 126090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126090&action=edit Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters. Test Plan: 1) Apply this patch 2) Install Kitchen Sink plugin v2.2.0 or later https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/do... 3) Run misc/cronjobs/process_message_queue.pl with any or all non-email related paramters 4) Note the plugin output shows the parameters were passed to the plugin Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I got a little stuck here. I activated plugins and installed the kitchensink plugin from the link below. But I am not sure about the parameters to run the misc/cronjobs/process_message_queue.pl with and where in the plugin the output would show. If I click on "Run report" from the plugin management screen, the plugin dies: The method Koha::Patron::Categories->search_limited is not covered by tests! Run tool appears to work. Sending back to Kyle for clarification. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #3)
I got a little stuck here.
I activated plugins and installed the kitchensink plugin from the link below.
But I am not sure about the parameters to run the misc/cronjobs/process_message_queue.pl with and where in the plugin the output would show.
If I click on "Run report" from the plugin management screen, the plugin dies: The method Koha::Patron::Categories->search_limited is not covered by tests!
Run tool appears to work.
Sending back to Kyle for clarification.
Pass something parameter like "-t email" and you should see it in the plugin output. That error on the report side shouldn't affect it, but I'll take a look at that too! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
Pass something parameter like "-t email" and you should see it in the plugin output. That error on the report side shouldn't affect it, but I'll take a look at that too!
Sorry... what and where is the plugin output? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #5)
Pass something parameter like "-t email" and you should see it in the plugin output. That error on the report side shouldn't affect it, but I'll take a look at that too!
Sorry... what and where is the plugin output?
if you run something like "./misc/cronjobs/process_message_queue.pl -t email" you should see some output from the script like: Plugin hook before_send_message called with the params: $VAR1 = { 'limit' => undef, 'letter_code' => undef, 'verbose' => undef, 'type' => 'email' }; on the command line -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 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=28474 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126090|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 127199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127199&action=edit Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters. Test Plan: 1) Apply this patch 2) Install Kitchen Sink plugin v2.2.0 or later https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/do... 3) Run misc/cronjobs/process_message_queue.pl with any or all non-email related paramters 4) Note the plugin output shows the parameters were passed to the plugin Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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=28474 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 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=28474 --- Comment #8 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=28474 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement passes the release notes| |parameters received by | |process_message_queue.pl | |through to the | |before_send_messages plugin | |calls. This allows plugins | |to respect calls that | |should only affect certain | |letter codes etc. Keywords|release-notes-needed | CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.05 released in| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Backported for plugins compatibility. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24183 CC| |fridolin.somers@biblibre.co | |m Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24183 [Bug 24183] Introduce `before_send_messages` hook -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.11.00,21.05.05 |21.11.00,21.05.05,20.11.12 released in| | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.12 (Backported for plugins compatibility) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28474 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- 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=28474 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35148 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35148 [Bug 35148] before_send_messages plugin hook does not pass the --where option -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org