Summary: | Add test mode to process_message_queue.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Notices | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | mtompset, srdjan, veron |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 15857 - Add test mode to process_message_queue.pl
Bug 15857 - Add test mode to process_message_queue.pl |
Description
Kyle M Hall (khall)
2016-02-18 18:35:35 UTC
Created attachment 48222 [details] [review] Bug 15857 - Add test mode to process_message_queue.pl It would be nice for testing and migration purposes if we could run process_message_queue.pl but have the emails go to a testing address instead of the patron's email address, and have SMS messages go to a testing phone number instead of the patron's sms number. Test Plan: 1) Apply this patch 2) Add some stuff to the message queue however you wish 3) Run process_message_queue.pl with the addition parameters --test --test-email your@email.com 4) Note that you recieve those emails, and not the address listed in the message_queue table! 5) Bonus points: If you have an SMS service, repeat the test with SMS notices and --test-sms With patch applied, I get (with and without test mode): "state" variable @_ masks earlier declaration in same scope at /usr/share/kohaclone/C4/Letters.pm line 1282. "my" variable $message masks earlier declaration in same scope at /usr/share/kohaclone/C4/Letters.pm line 1298. syntax error at /usr/share/kohaclone/C4/Letters.pm line 1237, near ") if" syntax error at /usr/share/kohaclone/C4/Letters.pm line 1246, near "}" Global symbol "$message" requires explicit package name at /usr/share/kohaclone/C4/Letters.pm line 1250. syntax error at /usr/share/kohaclone/C4/Letters.pm line 1256, near "}" Can't use global @_ in "my" at /usr/share/kohaclone/C4/Letters.pm line 1261, near "= @_" syntax error at /usr/share/kohaclone/C4/Letters.pm line 1279, near "}" (Might be a runaway multi-line << string starting on line 1265) Can't use global @_ in "my" at /usr/share/kohaclone/C4/Letters.pm line 1282, near "= @_" syntax error at /usr/share/kohaclone/C4/Letters.pm line 1295, near "}" syntax error at /usr/share/kohaclone/C4/Letters.pm line 1344, near "}" Can't use global @_ in "my" at /usr/share/kohaclone/C4/Letters.pm line 1347, near "= @_" /usr/share/kohaclone/C4/Letters.pm has too many errors. Compilation failed in require at misc/cronjobs/process_message_queue.pl line 28. BEGIN failed--compilation aborted at misc/cronjobs/process_message_queue.pl line 28. Could you hashref that huge parameter list while you are at it? Created attachment 49114 [details] [review] Bug 15857 - Add test mode to process_message_queue.pl It would be nice for testing and migration purposes if we could run process_message_queue.pl but have the emails go to a testing address instead of the patron's email address, and have SMS messages go to a testing phone number instead of the patron's sms number. Test Plan: 1) Apply this patch 2) Add some stuff to the message queue however you wish 3) Run process_message_queue.pl with the addition parameters --test --test-email your@email.com 4) Note that you recieve those emails, and not the address listed in the message_queue table! 5) Bonus points: If you have an SMS service, repeat the test with SMS notices and --test-sms (In reply to M. Tompsett from comment #3) > Could you hashref that huge parameter list while you are at it? Fixed! Could you specify which sub's parameter list you are referring to? _send_message_by_email( $message, $params ) and _send_message_by_sms( $message, $params ) rather than exploding individual params. Kyle does Srdjan's comment require a follow-up, or is this still 'Needs Signoff?' |