Currently with the automatic_renewals.pl script, materials are still auto-renewed even if the patron's account has expired. The automatic renewals script has error conditions which prevent automatic renewals in these circumstances: $error eq 'too_many' or $error eq 'on_reserve' or $error eq 'restriction' or $error eq 'overdue' or $error eq 'auto_too_late' or $error eq 'auto_too_much_oweing' or $error eq 'auto_too_soon The error conditions should take into account the expiry date of borrower and not auto renew if the borrower's account has expired. For example adding a new error code such as 'borrower_expired' - or whatever convention achieves this.
Do we need a new syspref here or must it be the default behaviour? Or based on BlockExpiredPatronOpacActions?
We believe it should be the default behaviour rather than requiring some sort of system preference. If the user has expired, they shouldn't be making any new transactions.
Hi Jonathan, there is has been a lot of dicussion about this and libraries have different ideas about this, for some a hold that can be placed is an incentive for the user to come back to the library and renew their membership etc. Have you checked the BlockExpiredPatronOpacActions system prefernece? [Block|don't block] expired patrons from OPAC actions such as placing a hold or renewing. Note that the setting for a patron category takes priority over this system preference. I think it would make sense to treat auto-renewals according to this setting.
Hi Katrin, very happy to do that if there is a use case for other libraries. We just need to make sure there is a mechanism in place for expired users and auto-renewals. happy to go with your suggestion though!
It is not clear to me if we want another pref "ExpiredBlockRenewing" (like OverduesBlockRenewing and RestrictionBlockRenewing) to block renewals globally or if we want to fix this behaviour only for auto renewals.
It's a good question. I think as ExpiredPatronBlockOpacActions already covers normal renewals it makes sense to include AutoRenewals there. If we want to have both separate, I'd make the new pref specific, so that it doesn't interfere with the existing pref: ExpiredBlockAutoRenewing.
I agree with Katrin, would be very happy with that.
Created attachment 68633 [details] [review] Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set If the patron's account has expired and BlockExpiredPatronOpacActions is set, we expect auto renewal to be rejected. Test plan: Use the automatic_renewals.pl cronjob script to auto renew a checkout Before this patch, if the patron's account has expired the auto renew was done. With this patch, it will only be auto renewed if BlockExpiredPatronOpacActions is not set.
Comment on attachment 68633 [details] [review] Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set Review of attachment 68633 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/updatedatabase.pl @@ +14854,4 @@ > }); > > SetVersion( $DBversion ); > + print "Upgrade to $DBversion done (Bug 12768 - Add 'Processing Fee' to the account_offset_types table if missing)\n"; This isn't related to this bug.
I tried it, I started by setting BlockExpiredPatronOpacActions to set, checked out an item for a particular patron, change the expiration date of that patron so he is now expired and then executed automatic_renewals.pl. The patch didn't seem to make a difference, it passed in both cases..
(In reply to Dominic Pichette from comment #11) > I tried it, I started by setting BlockExpiredPatronOpacActions to set, > checked out an item for a particular patron, change the expiration date of > that patron so he is now expired and then executed automatic_renewals.pl. > The patch didn't seem to make a difference, it passed in both cases.. Dominic, you need to know how automatic renewals work if you want to test this patch. You should enable it in the issuing rule and then tick the "Automatic renewal" on the checkout screen. Is it what you tried?
Tested patch, seems to work as expected :) One comment: when I turned the syspref on to "Block" the renew column in the list of checkouts (circulation.pl) it shows auto_account_expired (5 of 5 renewals remaining) do we want to show that wording? Would just 'Account expired' be more user friendly? Otherwise happy to sign off.
Created attachment 69502 [details] [review] Bug 19444: Display error message for auto_account_expired
(In reply to Claire Gravely from comment #13) > do we want to show that wording? Would just 'Account expired' be more user > friendly? Thanks for testing Claire! Yes you are right, the last patch display a human friendly message for this error code.
Created attachment 69503 [details] [review] [SIGNED-OFF] Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set If the patron's account has expired and BlockExpiredPatronOpacActions is set, we expect auto renewal to be rejected. Test plan: Use the automatic_renewals.pl cronjob script to auto renew a checkout Before this patch, if the patron's account has expired the auto renew was done. With this patch, it will only be auto renewed if BlockExpiredPatronOpacActions is not set. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 69504 [details] [review] [SIGNED-OFF] Bug 19444: Display error message for auto_account_expired Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 69810 [details] [review] Bug 19444: Do not auto renew if patron is expired and BlockExpiredPatronOpacActions is set If the patron's account has expired and BlockExpiredPatronOpacActions is set, we expect auto renewal to be rejected. Test plan: Use the automatic_renewals.pl cronjob script to auto renew a checkout Before this patch, if the patron's account has expired the auto renew was done. With this patch, it will only be auto renewed if BlockExpiredPatronOpacActions is not set. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 69811 [details] [review] Bug 19444: Display error message for auto_account_expired Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 69812 [details] [review] Bug 19444: (QA follow-up) Fix tests for UNIMARC Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 69813 [details] [review] Bug 19444: (QA follow-up) Remove repeating condition Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Pushed to stable for 17.11.02
Pushed to 17.05.x for v17.05.08