[Bug 30300] New: Add patron expiration email to patron messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Bug ID: 30300 Summary: Add patron expiration email to patron messaging preferences Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org This enhancement will add a messaging preference for patron expiration notices, and adjust the cronjob that sends these notices to obey the patrons preference -- 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=30300 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30301 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30301 [Bug 30301] Add a system preference to allow specifying the patron expiration notices as mandatory -- 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=30300 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- 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=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com CC| |matt.blenkinsop@ptfs-europe | |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.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=30300 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 169860 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169860&action=edit Bug 30300: Add a patron expiry messaging preference -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 169861 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169861&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Roman Dolny <roman.dolny@jezuici.pl> 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=30300 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169860|0 |1 is obsolete| | Attachment #169861|0 |1 is obsolete| | --- Comment #3 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 169870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169870&action=edit Bug 30300: Add a patron expiry messaging preference Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #4 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 169871 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169871&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29194 CC| |roman.dolny@jezuici.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think a lot of libraries currently use the "where" parameter of this script to limit to certain patron categories. I think it's a good idea to add to messaging preferences, but will this still work with the patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- It would do, the script fetches patrons based on the "where" option and then loops through them which is where the patron messaging preferences stuff is handled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Matt Blenkinsop from comment #6)
It would do, the script fetches patrons based on the "where" option and then loops through them which is where the patron messaging preferences stuff is handled
+1 Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #8 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- If I read this correctly, before this patch all expiring patrons selected by the job would receive a notice. Afterwards, no one will receive a notice until they set messaging preferences, so libraries will need to add a preference for all patrons, should we do this in the update? or simply note in the release notes? We get the messaging preferences here, but queue_notice also does - do we need to do this? Or can we simply let queue_notice decide what/if to send? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Also, the user won't get a membership renewal notice if they don't want expiry notices? Is that correct? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169871|0 |1 is obsolete| | --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 173810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173810&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #11 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 173811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173811&action=edit Bug 30300: (QA follow-up) Move logic to queue_notice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173811|0 |1 is obsolete| | --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 173812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173812&action=edit Bug 30300: (QA follow-up) Move logic to queue_notice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- (In reply to Nick Clemens (kidclamp) from comment #8)
If I read this correctly, before this patch all expiring patrons selected by the job would receive a notice. Afterwards, no one will receive a notice until they set messaging preferences, so libraries will need to add a preference for all patrons, should we do this in the update? or simply note in the release notes?
I'm not sure what the preference would be for libraries? Having it set by default or wanting it to be set explicitly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Nick Clemens (kidclamp) <nick@bywatersolutions.com> 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=30300 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169870|0 |1 is obsolete| | Attachment #173810|0 |1 is obsolete| | Attachment #173812|0 |1 is obsolete| | --- Comment #14 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 173820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173820&action=edit Bug 30300: Add a patron expiry messaging preference Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <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=30300 --- Comment #15 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 173821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173821&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! Signed-off-by: Nick Clemens <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=30300 --- Comment #16 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 173822 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173822&action=edit Bug 30300: (QA follow-up) Move logic to queue_notice Signed-off-by: Nick Clemens <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=30300 --- Comment #17 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 173823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173823&action=edit Bug 30300: (QA follow-up) Remove extra return The routine loops on the found transports, if there are none it will simply return, no need to short circuit Signed-off-by: Nick Clemens <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=30300 --- Comment #18 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Matt Blenkinsop from comment #13)
(In reply to Nick Clemens (kidclamp) from comment #8)
If I read this correctly, before this patch all expiring patrons selected by the job would receive a notice. Afterwards, no one will receive a notice until they set messaging preferences, so libraries will need to add a preference for all patrons, should we do this in the update? or simply note in the release notes?
I'm not sure what the preference would be for libraries? Having it set by default or wanting it to be set explicitly
We have the pref "AutoRenewlNotices" for automatic renewals - but it's a little crufty Leaving this for RM decisions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA Keywords| |release-notes-needed --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I struggle a bit with this one in terms of having no regressions/confusion for libraries and I think this needs more work. 1) Regression (blocker) After updating, no MEMBERSHIP_EXPIRY notices will be sent as no patrons will have the flag in their patron accounts, even if it worked before. I don't have a good solution here. Maybe the best we could do is globally add the flag if MembershipExpiryDaysNotice is set to a value >= 1? I believe together with the where it would keep the current behavior? 2) Documentation (not blocker, but easy) It's not clear from the GUI that a "where" option might overwrite the setting in the patron account. I could have a patron with checked patron expiry notice, that is then "removed" from the list by a where parameter. I think at least a note on the system preference could help here to fight off general confusion. 3) Visibility of configuration option (blocker) I feel the visiblity of the messaging preference should be dependent on the MembershipExpiryDaysNotice system preference so libraries have the option to easily turn this feature off or "keep it invisible" after update. I hope I was not missing something! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173820|0 |1 is obsolete| | --- Comment #20 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174713&action=edit Bug 30300: Add a patron expiry messaging preference Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <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=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173821|0 |1 is obsolete| | --- Comment #21 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174714&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! Signed-off-by: Nick Clemens <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=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173822|0 |1 is obsolete| | --- Comment #22 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174715&action=edit Bug 30300: (QA follow-up) Move logic to queue_notice Signed-off-by: Nick Clemens <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=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173823|0 |1 is obsolete| | --- Comment #23 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174716&action=edit Bug 30300: (QA follow-up) Remove extra return The routine loops on the found transports, if there are none it will simply return, no need to short circuit Signed-off-by: Nick Clemens <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=30300 --- Comment #24 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174717&action=edit Bug 30300: (QA follow-up) Prevent regression and improve clarity This patch amends the DB update to check the MembershipExpiryDaysNotice syspref and sets the flag for all patrons if the syspref is set It also improves the UI visiblity by hiding the messaging preference if the syspref isn't set and adding more clarity to the syspref definition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #25 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #19)
1) Regression (blocker)
After updating, no MEMBERSHIP_EXPIRY notices will be sent as no patrons will have the flag in their patron accounts, even if it worked before.
I don't have a good solution here. Maybe the best we could do is globally add the flag if MembershipExpiryDaysNotice is set to a value >= 1? I believe together with the where it would keep the current behavior?
I've implemented the above suggestion in the database update file and I've set the bug back to SO so that this can be properly QA checked. This could be quite an intensive update on systems with large numbers of patrons
2) Documentation (not blocker, but easy)
It's not clear from the GUI that a "where" option might overwrite the setting in the patron account.
I could have a patron with checked patron expiry notice, that is then "removed" from the list by a where parameter. I think at least a note on the system preference could help here to fight off general confusion.
Added a note to the syspref
3) Visibility of configuration option (blocker)
I feel the visiblity of the messaging preference should be dependent on the MembershipExpiryDaysNotice system preference so libraries have the option to easily turn this feature off or "keep it invisible" after update.
The line in the table is now hidden if the syspref isn't switched on -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174717|0 |1 is obsolete| | --- Comment #26 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 174888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174888&action=edit Bug 30300: (QA follow-up) Prevent regression and improve clarity This patch amends the DB update to check the MembershipExpiryDaysNotice syspref and sets the flag for all patrons if the syspref is set It also improves the UI visiblity by hiding the messaging preference if the syspref isn't set and adding more clarity to the syspref definition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174713|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176154&action=edit Bug 30300: Add a patron expiry messaging preference Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174714|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176155&action=edit Bug 30300: Update the cronjob to respect patron messaging preferences Test plan: 1) Apply patch and run updatedatabase 2) In system preferences set MembershipExpiryDaysNotice to 5 3) Choose a patron and edit their expiry date to today's date 4) Ensure that patron has a primary email address 5) Run perl misc/cronjobs/membership_expiry.pl -c -v -before 10 -after 10 6) Check the patron's messages, there should be no expiry notice queued 7) Edit the patron's messaging preferences and select the checkbox for email in the row for 'Patron expiry' 8) Repeat step 5 9) There should be a patron expiry message in the patron's message queue 10) Sign off! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174715|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176156 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176156&action=edit Bug 30300: (QA follow-up) Move logic to queue_notice Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174716|0 |1 is obsolete| | --- Comment #30 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176157&action=edit Bug 30300: (QA follow-up) Remove extra return The routine loops on the found transports, if there are none it will simply return, no need to short circuit Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174888|0 |1 is obsolete| | --- Comment #31 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176158&action=edit Bug 30300: (QA follow-up) Prevent regression and improve clarity This patch amends the DB update to check the MembershipExpiryDaysNotice syspref and sets the flag for all patrons if the syspref is set It also improves the UI visiblity by hiding the messaging preference if the syspref isn't set and adding more clarity to the syspref definition Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #32 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176159&action=edit Bug 30300: (QA follow-up) Remove use of Koha:: and C4:: in DB Update We require that database updates don't rely on Koha:: or C4:: code to reliably maintain idempotency (The underlying methods may change at a future date). This approach uses two INSERT IGNORE statements which should also improve performance. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> 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=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_05_candidate |additional_work_needed --- Comment #33 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've made a few little changes in a follow-up patch: 1) Terminology I have updated "Patron expiry" to read "Patron account expiry". I was wondering if 'library account expiry warning' or similar might not even be better as a description for the messaging preference in the OPAC? 2) Database update I have updated to latest "standard" using say_sucess etc. To be fixed: 3) Sample notices The patch adds message transports SMS and phone, but we don't ship sample notices for these. I think at least for SMS this would make sense and would be consistent with other features. Can go on a separate bug. 4) Release notes Summarizing the behavior on update etc. would be really useful here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #34 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This adds the option to set release notes| |the patron account | |expiration notice in the | |patron account's messaging | |preference. | | | |If the | |MembershipExpiryDaysNotice | |system preference is in | |use, the patron account | |expiration notice will be | |activated automatically on | |update for all existing | |patron accounts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 carthur@slolibrary.org <carthur@slolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carthur@slolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | CC| |fridolin.somers@biblibre.co | |m --- Comment #35 from Fridolin Somers <fridolin.somers@biblibre.com> --- additional_work_needed ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It was because of these notes, 3 might still be worth a separate bug, release notes have been added, removing that keyword too. -- To be fixed: 3) Sample notices The patch adds message transports SMS and phone, but we don't ship sample notices for these. I think at least for SMS this would make sense and would be consistent with other features. Can go on a separate bug. 4) Release notes Summarizing the behavior on update etc. would be really useful here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #37 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #38 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- If I understand correctly, for a library who would want to activate the notification after this version, they'd have to - Enter a value in MembershipExpiryDaysNotice - Check the notification in each patron category they want to send the notification to - Run borrowers-force-messaging-defaults.pl ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 --- Comment #39 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- We started updating our clients to 25.05 this week. We're getting cron errors because patrons who don't have emails now have the email preference checked in their file. I'm not fluent enough in perl to modify the database update to ignore the patrons who don't have emails in their account, but I think that would be the best option. Somewhere here, I guess? my $days_notice = C4::Context->preference('MembershipExpiryDaysNotice'); if ($days_notice) { $dbh->do( q{ INSERT IGNORE INTO borrower_message_preferences (`borrower_message_preference_id`, `borrowernumber`, `categorycode`, `message_attribute_id`, `days_in_advance`, `wants_digest`) SELECT NULL, borrowernumber, NULL, ?, NULL, NULL FROM borrowers }, {}, $message_attribute_id ); $dbh->do( q{ INSERT IGNORE INTO borrower_message_transport_preferences (`borrower_message_preference_id`, `message_transport_type`) SELECT borrower_message_preference_id, 'email' FROM borrower_message_preferences WHERE message_attribute_id = ? }, {}, $message_attribute_id ); say_success( $out, "'Patron expiry' notification activated in patron accounts" ); Right now I did this in a test db and it removed the preference for 14000+ patrons who did not have any email addresses in their account (I have yet to do it in production) delete from borrower_message_preferences where borrower_message_preference_id in (select borrower_message_preference_id from borrower_message_preferences left join borrowers using (borrowernumber) where message_attribute_id = 14 and (email is null or email = '') and (emailpro is null or emailpro = '') and (B_email is null or B_email = '')); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org