[Bug 41786] New: membership_expiry.pl -renew -active should include patrons 0-MembershipExpiryDaysNotice days before expiration
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41786 Bug ID: 41786 Summary: membership_expiry.pl -renew -active should include patrons 0-MembershipExpiryDaysNotice days before expiration Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: lari.taskula@hypernova.fi QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz membership_expiry.pl -renew -active should include patrons 0-MembershipExpiryDaysNotice days before expiration, not exactly MembershipExpiryDaysNotice days before expiration. membership_expiry.pl selects patrons who are expiring in exactly n days where n is the value from MembershipExpiryDaysNotice preference. Let's say, 30 as an example. When we have a cronjob with the following flags membership_expiry.pl -c -n -renew 12 -active it would be expected behavior to renew patrons who are about to expire within 30 days and who have been active in the last 12 months, last activity defined by borrowers.lastseen. It is not the case when lastseen is >12 months away at exactly 30 days from expiration, but <12 months <30 days from expiration. This could happen when login is defined as activity, and patron who hasn't been active receives a notification of an expiring account then logins to update their activity. Once the 30-day mark has been passed, such patrons will simply be ignored and they will expire. This can be fixed with the -before flag, but I think it is unexpected behavior. Also you can only hardcode a value to -before, so if you change MembershipExpiryDaysNotice, it will not update the -before value. I think the expected behavior is to renew patrons 0-MembershipExpiryDaysNotice days before expiration. -- 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=41786 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- I think this needs some discussion first. We can't just change the behavior without having consensus, because this change could break someone's cronjob workflow. -- 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=41786 --- Comment #2 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Lari Taskula from comment #0)
This can be fixed with the -before flag, but I think it is unexpected behavior. Also you can only hardcode a value to -before, so if you change MembershipExpiryDaysNotice, it will not update the -before value.
An alternative solution might be to use the --where flag and do a subquery selecting the value from MembershipExpiryDaysNotice. But I'm not a big fan of that solution. -- 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=41786 --- Comment #3 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Lari Taskula from comment #0)
membership_expiry.pl -c -n -renew 12 -active Correction, membership_expiry.pl -c -n -renew -active 12
I wish Bugzilla had an option to edit :) -- 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=41786 --- Comment #4 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 192612 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192612&action=edit Bug 41786: membership_expiry.pl -renew -active should include patrons 0-MembershipExpiryDaysNotice days before expiration -- 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=41786 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41786 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I have worked on this in the past. And we are still using something like: koha-foreach --chdir --enabled /usr/share/koha/misc/cronjobs/membership_expiry.pl -c koha-foreach --chdir --enabled /usr/share/koha/misc/cronjobs/membership_expiry.pl -c -before 21 -after -21 -letter MEMBERSHIP_EXPIRY2 So without automatic renewal (yet). The parameters before and after were added once just to cover the point you are making here. So I do not see the need for changing that actually. We could move the before/after values to preferences (as done in more cron script but not consistently) close to MembershipExpiryDaysNotice, in order to overcome the fact that changing A in the prefs should be followed by adjusting B in the cron file. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org