[Bug 40294] New: Mandatory patron expiration notice is not sent if patron does not have a primary contact method defined
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Bug ID: 40294 Summary: Mandatory patron expiration notice is not sent if patron does not have a primary contact method defined Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: emily.lamancusa@montgomerycountymd.gov QA Contact: testopia@bugs.koha-community.org Depends on: 30301 Bug 30301 added the option to force mandatory account expiration notices for a given patron category in the membership_expiry cron. In these cases, the primary contact method on the patron account is used to determine the transport type for the notice. However, primary contact method may not be a mandatory field depending on the system preference settings. If a patron doesn't have a primary contact method set for their account, this causes the notice not to get sent at all, even if the patron has one or more valid email addresses or SMS number on their account. We need a fallback to ensure the mandatory notice is sent in this case. I think it would make the most sense to specify transport type(s) in the patron category settings when making account expiration notices mandatory for that category. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30301 [Bug 30301] Add an option to specify the patron expiration notices as mandatory by patron category -- 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=40294 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Michael Adamyk <michael.adamyk@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.adamyk@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42539 -- 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=40294 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=40294 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I noticed this bug after filing Bug 42539 suggesting we manage enforcement via messaging preferences. I don't love using primary contact method in this manner. This is the only instance in which this field determines how/if a notice is sent. As Emily notes, for many libraries this is not a required field as previously it has been purely informational. -- 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=40294 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Andrew Fuerste-Henry from comment #1)
I noticed this bug after filing Bug 42539 suggesting we manage enforcement via messaging preferences.
I don't love using primary contact method in this manner. This is the only instance in which this field determines how/if a notice is sent. As Emily notes, for many libraries this is not a required field as previously it has been purely informational.
I agree, I think most of our libraries are not using primary contact method because it's a rather recent field and it was only informational so far. It probably means that since the change expriation notices have been broken :( -- 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=40294 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I agree this is major. -- 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=40294 Danielle M. <dmeininger591@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmeininger591@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 42539 has been marked as a duplicate of this bug. *** -- 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=40294 Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marie-luce.laflamme@inlibro | |.com --- Comment #5 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- This is the only notification that uses the patron's primary contact method. If the primary contact method is set to an unmatching value (for example, "secondary phone") but the patron account has a valid email address, the cron job reports an error stating that the membership_expiry notice cannot be sent using the selected contact method, even though an email copy is still sent. Using the primary contact method to override the messaging preference seems like a useful feature, but if that's the intended behaviour, it would make sense to apply it consistently across other notifications as well. On the other hand, would it make sense to fall back to the patron's email address when one is available? That would avoid unnecessary cron errors while still ensuring the notification is delivered. -- 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=40294 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Given all the older installations using this feature and not using primary contact (it's optional, no functionality documented yet), I think we really need to remove this dependency. It's just not right and lacks the needed flexibility a library needs - we have messaging preferences to set the transport to use. -- 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=40294 Catrina Berka <catrina@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |catrina@bywatersolutions.co | |m --- Comment #7 from Catrina Berka <catrina@bywatersolutions.com> --- Just chiming in to agree with everyone else here that this is a big difference in behavior that ought to be reverted back. -- 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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |emily.lamancusa@montgomeryc |ity.org |ountymd.gov -- 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=40294 --- Comment #8 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201331&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #9 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201332&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Got to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Find or create a patron using the patron category from step 1 4. Edit the patron account and set Expiry date to tomorrow's date 4. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 5. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 6. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl 7. Open the patron's Notices tab --> An email notice should have been queued 8. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 9. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 10. Edit the patron account and delete all email addresses 11. Run the cron again --> a phone notice should have been queued 12. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #10 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201333&action=edit Bug 40294: Fix description in API spec String edit - the existing description for enforce_expiry_date was wrong -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Emily, is this ready for sign-off? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201331|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201332|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201333|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=40294 --- Comment #12 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201375&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #13 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201376&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Got to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Find or create a patron using the patron category from step 1 4. Edit the patron account and set Expiry date to tomorrow's date 4. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 5. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 6. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl 7. Open the patron's Notices tab --> An email notice should have been queued 8. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 9. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 10. Edit the patron account and delete all email addresses 11. Run the cron again --> a phone notice should have been queued 12. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #14 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201377&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #15 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201378&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201375|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201376|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201377|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201378|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=40294 --- Comment #16 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201381&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #17 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201382 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201382&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Got to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #18 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201383&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #19 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 201384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201384&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #20 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- (In reply to Katrin Fischer from comment #11)
Hi Emily, is this ready for sign-off?
It is now! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA Keywords| |release-notes-needed CC| |david@davidnind.com --- Comment #21 from David Nind <david@davidnind.com> --- Have Failed QA as the tests no longer pass for me. Everything else works as per the test plan. Suggested tweaks for the updated hint text (in the fourth patch): - With the patches: Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences. If phone or SMS notices are enabled in your system, you should make sure the corresponding MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWED templates are defined in the <a href="/cgi-bin/koha/tools/letter.pl">Notices and Slips tool</a> - Suggested changes: Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences. If phone or SMS notices are enabled, make sure the corresponding MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWED notices are defined in the <a href="/cgi-bin/koha/tools/letter.pl">Notices and slips tool</a>. Testing notes (using KTD): 1. Before the patch, you can't see "Patron account expiry" messaging preference options for either: - Patron category: Default messaging preferences for this patron category - Patron account: Patron messaging preferences These patches fix that (I think). 2. Apply the patches. 3. Reset everything, so that the new notices are available (not necessarily required): reset_all 4. Step 8(i): This worked for me to generate a notice (maybe something to do with time zones and the KTD server times): perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 5. Step 14: - If PhoneNotification system preference set to "Disable": sms notice queued - If PhoneNotification system preference set to "Disable" and no sms number: print notice queued -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201381|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201382|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201383|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201384|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=40294 --- Comment #22 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202183 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202183&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #23 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202184&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Got to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #24 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202185&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #25 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202186&action=edit Bug 40294: Add default print notices for existing installations If an existing installation doesn't already have print notice templates defined for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, add default notice templates to the database. To test: 1. Start a fresh test environment without the patch applied 2. Apply patch and updatedatabase --> Database update should say that print notice templates for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWAL were added 3. In the staff interface, go to Tools > Notices and Slips 4. Search for MEMBERSHIP_EXPIRY and click to Edit button 5. Expand Print section --> Confirm the default text has been filled in 6. Make some changes to the Print section and save 7. Repeat steps 4-6 for MEMBERSHIP_RENEWAL 8. updatedatabase again --> Database update should say the print notice templates are already defined and no changes are needed 9. Repeat steps 3-5 for MEMBERSHIP_EXPIRY --> Confirm that the changes you made earlier are still there 10. Repeat steps 3-5 for MEMBERSHIP_RENEWAL --> Confirm that the changes you made earlier are still there -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #26 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202187&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #27 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Thanks for testing, David, and thanks for the wording suggestion! Ah, the tests were wonky because I added default print templates for new installations, but didn't address the case where an upgraded installation might not have those templates defined (and then wrote the tests based on that latter case). I added a database update for that case and updated the tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #28 from David Nind <david@davidnind.com> --- I've retested, but have not signed off: 1. I don't seem to be getting the same results as I got with previous testing. I'm sure things worked as expected - the right type of notices were queued. 2. However, I seem to be getting different results now - see the results for each step below. No longer sure what is expected with the different settings. 3. Tests pass if I just apply the patches, run the database and restart_all. 4. However, after configuring things for the tests and working through the test plan, the tests no longer pass. Retesting ========= Applied patches first and ran updatedatabase and restart_all Step 9: - No message options selected under messaging preferences for either patron category or the individual patron (for Patron account expiry (mandatory)). - Ran: perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 - For the patron, a MEMBERSHIP_EXPIRY print notice was queued Step 10: Email address for patron (as well as sms and primary phone numbers) - Patron category messaging preferences: - Individual options selected for the patron category (no options set for individual patron): . SMS: email notice queued . Phone: email notice queued . Email: email notice queued - All options selected for the patron category: one email notice queued - So it looks like only the email notice is queued, which doesn't seem correct - Individual patron messaging preferences (no options set for patron category): - Individual options selected for the individual patron: . SMS: sms notice queued (as expected) . Phone: phone notice queued (as expected) . Email: email notice queued (as expected) - All options selected for the individual patron: sms, phone, and email notices queued - So looks like this is working as expected Steps 12 and 13: No selection for both individual patron messaging preferences and patron category messaging preferences: - phone notice queued (result expected as per the test plan) Step 14: No email address for patron (but does have sms and primary phone numbers) - Patron category messaging preferences: - Individual options selected for the patron category (no options set for individual patron): . SMS: phone notice queued . Phone: phone notice queued (as expected) . Email: phone notice queued - All options selected for the patron category: one phone notice queued - Not sure what is expected, but this doesn't seem correct to me - Individual patron messaging preferences (no options set for patron category): - Individual options selected for the individual patron: . SMS: sms notice queued (as expected) . Phone: phone notice queued (as expected) . Email: print notice queued (as expected(?)) - All options selected for the individual patron: sms, phone, and print notices queued (as expected) - Seems to be working as expected Tests ===== After applying all the patches, and updatedatabase, and a restart_all the tests pass for me. However, after working through the test plan and then running again, the tests fail for me. prove t/db_dependent/Koha/Patrons.t t/db_dependent/Koha/Patrons.t .. 42/52 # Looks like you planned 15 tests but ran 11. # Failed test 'queue_notice' # at t/db_dependent/Koha/Patrons.t line 3486. Can't call method "store" on an undefined value at t/db_dependent/Koha/Patrons.t line 3386. # Failed test 'no warnings' # at /usr/share/perl/5.40/Test/Builder.pm line 193. # There were 1 warning(s) # Previous test 11 'Count of queued notices not increased in test mode' # Violation of unique constraint in Letter at /kohadevbox/koha/t/lib/TestBuilder.pm line 365. # at /kohadevbox/koha/t/lib/TestBuilder.pm line 365. # t::lib::TestBuilder::_buildColumnValues(t::lib::TestBuilder=HASH(0x5610610bf4e8), HASH(0x56106dbca220)) called at /kohadevbox/koha/t/lib/TestBuilder.pm line 121 # t::lib::TestBuilder::build(t::lib::TestBuilder=HASH(0x5610610bf4e8), HASH(0x56106dc43b90)) called at /kohadevbox/koha/t/lib/TestBuilder.pm line 87 # t::lib::TestBuilder::build_object(t::lib::TestBuilder=HASH(0x5610610bf4e8), HASH(0x56106dbf2e00)) called at t/db_dependent/Koha/Patrons.t line 3386 # main::__ANON__() called at /usr/share/perl/5.40/Test/Builder.pm line 374 # eval {...} called at /usr/share/perl/5.40/Test/Builder.pm line 374 # Test::Builder::subtest(Test::Builder=HASH(0x5610612824e0), "queue_notice", CODE(0x56106d9b7d80)) called at /usr/share/perl/5.40/Test/More.pm line 831 # Test::More::subtest("queue_notice", CODE(0x56106d9b7d80)) called at t/db_dependent/Koha/Patrons.t line 3486 # # Looks like your test exited with 11 just after 44. t/db_dependent/Koha/Patrons.t .. Dubious, test returned 11 (wstat 2816, 0xb00) Failed 10/52 subtests Test Summary Report ------------------- t/db_dependent/Koha/Patrons.t (Wstat: 2816 (exited 11) Tests: 44 Failed: 2) Failed tests: 43-44 Non-zero exit status: 11 Parse errors: Bad plan. You planned 52 tests but ran 44. Files=1, Tests=44, 61 wallclock secs ( 0.09 usr 0.02 sys + 39.49 cusr 15.32 csys = 54.92 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202183|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202184|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202185|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202186|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202187|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=40294 --- Comment #29 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202213&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #30 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202214&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Go to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -v -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #31 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202215&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #32 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202216 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202216&action=edit Bug 40294: Add default print notices for existing installations If an existing installation doesn't already have print notice templates defined for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, add default notice templates to the database. To test: 1. Start a fresh test environment without the patch applied 2. Apply patch and updatedatabase --> Database update should say that print notice templates for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWAL were added 3. In the staff interface, go to Tools > Notices and Slips 4. Search for MEMBERSHIP_EXPIRY and click to Edit button 5. Expand Print section --> Confirm the default text has been filled in 6. Make some changes to the Print section and save 7. Repeat steps 4-6 for MEMBERSHIP_RENEWAL 8. updatedatabase again --> Database update should say the print notice templates are already defined and no changes are needed 9. Repeat steps 3-5 for MEMBERSHIP_EXPIRY --> Confirm that the changes you made earlier are still there 10. Repeat steps 3-5 for MEMBERSHIP_RENEWAL --> Confirm that the changes you made earlier are still there -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #33 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202217&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #34 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Thanks again for the thorough testing! I updated the tests again; hopefully third time's the charm!
Step 9: - No message options selected under messaging preferences for either patron category or the individual patron (for Patron account expiry (mandatory)). - Ran: perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 - For the patron, a MEMBERSHIP_EXPIRY print notice was queued
Did the patron account have any email address, sms, or primary phone number saved when you ran step 9? If it had no contact information saved, queueing the print notice is the expected behavior. The patron category messaging preferences (other than the setting to make the expiry notices mandatory) shouldn't affect the behavior here - those are just the default settings that get set when a new patron account is created. The rest of your test results do match the expected behavior based on the individual patron account's messaging preferences. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #35 from David Nind <david@davidnind.com> --- (In reply to Emily Lamancusa (emlam) from comment #34)
Thanks again for the thorough testing! I updated the tests again; hopefully third time's the charm!
Tests still fail for me: - Apply the patches - Run the database update - Restart everything - Test failures for test 43 and 52 - see [1] They pass after step 3 of the test plan. I tried various combinations of settings, but I think it is because there are no phone and sms notices. If I: - Set SMSSendDriver to Email (required so I can add an SMS notice) - Set PhoneNotification to Enable (required so I can a phone notice) - Add text to the phone and sms notices for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWED ==> The tests pass
Step 9: - No message options selected under messaging preferences for either patron category or the individual patron (for Patron account expiry (mandatory)). - Ran: perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 - For the patron, a MEMBERSHIP_EXPIRY print notice was queued
Did the patron account have any email address, sms, or primary phone number saved when you ran step 9? If it had no contact information saved, queueing the print notice is the expected behavior.
I'm not sure (I thought I had added email and an SMS number), but it looks like I hadn't at that stage. Things work as expected after I retested: - With an email address, SMS number, and primary phone number: ==> email notice - With no email address (but SMS number and primary phone number): ==> Phone notice - With no email address or SMS number (but a primary phone number): ==> Phone notice - With no email address or primary phone number (but an SMS number) ==> SMS notice - With no info for email address, SMS number, and primary phone number: ==> print notice So all as expected when I test it right 8-)
The patron category messaging preferences (other than the setting to make the expiry notices mandatory) shouldn't affect the behavior here - those are just the default settings that get set when a new patron account is created. The rest of your test results do match the expected behavior based on the individual patron account's messaging preferences.
Great! [1] Test failures ================= I get test failures after applying the patches, running the database update, and a restart_all. I think it is because MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWED don't have default phone and sms notice. If I: - Set SMSSendDriver to Email (required so I can add an SMS notice) - Set PhoneNotification to Enable (required so I can a phone notice) - Add text to the phone and sms notices for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWED ==> The tests pass prove t/db_dependent/Koha/Patrons.t t/db_dependent/Koha/Patrons.t .. 42/52 # Failed test 'Mandatory expiry notice falls back to phone if patron email undefined and phone allowed' # at t/db_dependent/Koha/Patrons.t line 3456. # got: '0' # expected: '1' # Failed test 'Mandatory expiry notice falls back to sms if patron email undefined, phone not allowed, and sms allowed' # at t/db_dependent/Koha/Patrons.t line 3472. # got: '1' # expected: '2' # Looks like you failed 2 tests of 15. # Failed test 'queue_notice' # at t/db_dependent/Koha/Patrons.t line 3495. t/db_dependent/Koha/Patrons.t .. 51/52 # Failed test 'no warnings' # at /usr/share/perl/5.40/Test/Builder.pm line 193. # There were 2 warning(s) # Previous test 12 'Mandatory expiry notice falls back to email if patron email is defined' # No members MEMBERSHIP_RENEWED letter transported by phone at /kohadevbox/koha/C4/Letters.pm line 598. # at /kohadevbox/koha/C4/Letters.pm line 598. # C4::Letters::GetPreparedLetter("module", "members", "message_transport_type", "phone", "borrowernumber", 639, "letter_code", "MEMBERSHIP_RENEWED", ...) called at /kohadevbox/koha/Koha/Patron.pm line 3291 # Koha::Patron::queue_notice(Koha::Patron=HASH(0x564ae6b345a8), HASH(0x564ae69efa40)) called at t/db_dependent/Koha/Patrons.t line 3454 # main::__ANON__() called at /usr/share/perl/5.40/Test/Builder.pm line 374 # eval {...} called at /usr/share/perl/5.40/Test/Builder.pm line 374 # Test::Builder::subtest(Test::Builder=HASH(0x564ada214bd0), "queue_notice", CODE(0x564ae6928660)) called at /usr/share/perl/5.40/Test/More.pm line 831 # Test::More::subtest("queue_notice", CODE(0x564ae6928660)) called at t/db_dependent/Koha/Patrons.t line 3495 # # ---------- # Previous test 13 'Mandatory expiry notice falls back to phone if patron email undefined and phone allowed' # No members MEMBERSHIP_RENEWED letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 598. # at /kohadevbox/koha/C4/Letters.pm line 598. # C4::Letters::GetPreparedLetter("module", "members", "message_transport_type", "sms", "borrowernumber", 639, "letter_code", "MEMBERSHIP_RENEWED", ...) called at /kohadevbox/koha/Koha/Patron.pm line 3291 # Koha::Patron::queue_notice(Koha::Patron=HASH(0x564ae6b345a8), HASH(0x564ae69efa40)) called at t/db_dependent/Koha/Patrons.t line 3470 # main::__ANON__() called at /usr/share/perl/5.40/Test/Builder.pm line 374 # eval {...} called at /usr/share/perl/5.40/Test/Builder.pm line 374 # Test::Builder::subtest(Test::Builder=HASH(0x564ada214bd0), "queue_notice", CODE(0x564ae6928660)) called at /usr/share/perl/5.40/Test/More.pm line 831 # Test::More::subtest("queue_notice", CODE(0x564ae6928660)) called at t/db_dependent/Koha/Patrons.t line 3495 # # Looks like you failed 2 tests of 52. t/db_dependent/Koha/Patrons.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/52 subtests Test Summary Report ------------------- t/db_dependent/Koha/Patrons.t (Wstat: 512 (exited 2) Tests: 52 Failed: 2) Failed tests: 43, 52 Non-zero exit status: 2 Files=1, Tests=52, 68 wallclock secs ( 0.10 usr 0.01 sys + 45.02 cusr 16.70 csys = 61.83 CPU) Result: FAIL More details: ... not ok 43 - queue_notice # Failed test 'queue_notice' # at t/db_dependent/Koha/Patrons.t line 3495. ... not ok 52 - no warnings # Failed test 'no warnings' # at /usr/share/perl/5.40/Test/Builder.pm line 193. # There were 1 warning(s) # Previous test 12 'Mandatory expiry notice falls back to email if patron email is defined' # No members MEMBERSHIP_RENEWED letter transported by phone at /kohadevbox/koha/C4/Letters.pm line 598. # at /kohadevbox/koha/C4/Letters.pm line 598. # C4::Letters::GetPreparedLetter("lang", "u4uW79M0Tj45ZzSZ7", "tables", HASH(0x562c1bc7a8d0), "borrowernumber", 2249, "letter_code", "MEMBERSHIP_RENEWED", ...) called at /kohadevbox/koha/Koha/Patron.pm line 3291 # Koha::Patron::queue_notice(Koha::Patron=HASH(0x562c1bc394c8), HASH(0x562c1bec5850)) called at t/db_dependent/Koha/Patrons.t line 3454 # main::__ANON__() called at /usr/share/perl/5.40/Test/Builder.pm line 374 # eval {...} called at /usr/share/perl/5.40/Test/Builder.pm line 374 # Test::Builder::subtest(Test::Builder=HASH(0x562c0f560f28), "queue_notice", CODE(0x562c1b653030)) called at /usr/share/perl/5.40/Test/More.pm line 831 # Test::More::subtest("queue_notice", CODE(0x562c1b653030)) called at t/db_dependent/Koha/Patrons.t line 3495 # # Looks like you failed 2 tests of 52. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202213|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202214|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202215|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202216|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=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202217|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=40294 --- Comment #36 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202563&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #37 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202564&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Go to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -v -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #38 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202565&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #39 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202566 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202566&action=edit Bug 40294: Add default print notices for existing installations If an existing installation doesn't already have print notice templates defined for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, add default notice templates to the database. To test: 1. Start a fresh test environment without the patch applied 2. Apply patch and updatedatabase --> Database update should say that print notice templates for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWAL were added 3. In the staff interface, go to Tools > Notices and Slips 4. Search for MEMBERSHIP_EXPIRY and click to Edit button 5. Expand Print section --> Confirm the default text has been filled in 6. Make some changes to the Print section and save 7. Repeat steps 4-6 for MEMBERSHIP_RENEWAL 8. updatedatabase again --> Database update should say the print notice templates are already defined and no changes are needed 9. Repeat steps 3-5 for MEMBERSHIP_EXPIRY --> Confirm that the changes you made earlier are still there 10. Repeat steps 3-5 for MEMBERSHIP_RENEWAL --> Confirm that the changes you made earlier are still there -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #40 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202567 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202567&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202567|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=40294 --- Comment #41 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 202569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202569&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #42 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Sorry for all the back and forth on this one! I dug more into how other tests have avoided this issue, and confirmed the latest tests work for me before and after following the test plan, as well as after a full reset. I haven't changed anything other than the test files, so there shouldn't be any behavior changes since the last time you tested. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 David Nind <david@davidnind.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=40294 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202563|0 |1 is obsolete| | Attachment #202564|0 |1 is obsolete| | Attachment #202565|0 |1 is obsolete| | Attachment #202566|0 |1 is obsolete| | Attachment #202569|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=40294 --- Comment #43 from David Nind <david@davidnind.com> --- Created attachment 202571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202571&action=edit Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #44 from David Nind <david@davidnind.com> --- Created attachment 202572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202572&action=edit Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Go to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -v -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #45 from David Nind <david@davidnind.com> --- Created attachment 202573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202573&action=edit Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #46 from David Nind <david@davidnind.com> --- Created attachment 202574 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202574&action=edit Bug 40294: Add default print notices for existing installations If an existing installation doesn't already have print notice templates defined for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, add default notice templates to the database. To test: 1. Start a fresh test environment without the patch applied 2. Apply patch and updatedatabase --> Database update should say that print notice templates for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWAL were added 3. In the staff interface, go to Tools > Notices and Slips 4. Search for MEMBERSHIP_EXPIRY and click to Edit button 5. Expand Print section --> Confirm the default text has been filled in 6. Make some changes to the Print section and save 7. Repeat steps 4-6 for MEMBERSHIP_RENEWAL 8. updatedatabase again --> Database update should say the print notice templates are already defined and no changes are needed 9. Repeat steps 3-5 for MEMBERSHIP_EXPIRY --> Confirm that the changes you made earlier are still there 10. Repeat steps 3-5 for MEMBERSHIP_RENEWAL --> Confirm that the changes you made earlier are still there Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #47 from David Nind <david@davidnind.com> --- Created attachment 202575 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202575&action=edit Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 --- Comment #48 from David Nind <david@davidnind.com> --- (In reply to Emily Lamancusa (emlam) from comment #42)
Sorry for all the back and forth on this one! I dug more into how other tests have avoided this issue, and confirmed the latest tests work for me before and after following the test plan, as well as after a full reset.
I haven't changed anything other than the test files, so there shouldn't be any behavior changes since the last time you tested.
Thanks for your perseverance Emily! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |bibliothek@th-wildau.de |y.org | CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes a bug with the release notes| |option to make expiration | |notices mandatory by patron | |category. Before this | |update, if a Primary | |Contact Method has not been | |selected on the patron's | |account, the expiration | |notice will not be sent. | |With the update, the | |standard patron messaging | |preferences can be set for | |the expiration notice. If | |the expiration notice is | |mandatory but the patron | |does not have any messaging | |preferences enabled for | |that notice, the notice | |will fall back to the first | |possible messaging method | |(depending on available | |contact information and | |system settings), in this | |order: -email -phone -sms | |-print -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40294 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the|This fixes a bug with the |This fixes a bug with the release notes|option to make expiration |option to make expiration |notices mandatory by patron |notices mandatory by patron |category. Before this |category. |update, if a Primary | |Contact Method has not been |Before this update, if a |selected on the patron's |Primary Contact Method has |account, the expiration |not been selected on the |notice will not be sent. |patron's account, the |With the update, the |expiration notice will not |standard patron messaging |be sent. |preferences can be set for | |the expiration notice. If |With the update, the |the expiration notice is |standard patron messaging |mandatory but the patron |preferences can be set for |does not have any messaging |the expiration notice. |preferences enabled for | |that notice, the notice |If the expiration notice is |will fall back to the first |mandatory, but the patron |possible messaging method |does not have any messaging |(depending on available |preferences enabled for |contact information and |that notice, the notice |system settings), in this |will fall back to the first |order: -email -phone -sms |possible messaging method |-print |(depending on available | |contact information and | |system settings), in this | |order: | |- email | |- phone | |- sms | |- print --- Comment #49 from David Nind <david@davidnind.com> --- Thanks for adding the release not! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org