[Koha-bugs] [Bug 31427] Automatic renewal errors should come before many other renewal errors

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 26 13:07:57 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31427

--- Comment #19 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Martin Renvoize from comment #18)
> I think I need some additional QA help here.. I've started writing a unit
> test to prevent future regressions, but it's raised more questions for me.
> 
> When exactly should an auto-renewal error get passed up.. for 'too_soon' we
> only pass when called via the cron.. but for other autorenewal errors we
> pass regardless.. which seems a little odd... if it's a non-cron check of
> renewability.. should we not skip the auto-renew failure code for those
> other failures too?

I think part of the issue here is that before bug 25393 an issue being marked
as 'auto_renew' in the issues table meant that it was not allowed to be renewed
via staff/opac at all - so passing the auto_renew_error codes back was realy
for information purposes.

After that bug, I think you are right, the auto renew specific errors should
not be returned when the check is not coming from the cron.

Looking at the logic, I think we can actually move all of the auto_renew checks
to the auto_renew checks to _CanBookBeAutoRenewed and have that routine call
CanBookBeRenewed - rather than having to check if we are coming from the cron.

So I think the order of blocks are:

For all:
no_item
no_checkout
onsite_checkout
item_issued_to_other_patron
item_denied_renewal

For auto_renew cron:
auto_account_expired
auto_too_late
auto_too_much_oweing
auto_too_soon
too_many
too_unseen
restriction
overdue
recalled
on_reserve
too_soon

For staff:
too_many
too_unseen
restriction
overdue
recalled
on_reserve
too_soon

For opac:
OPACFineNoRenewals - checked in script opac-user.pl
BlockExpiredPatronActions - checked in script opac-renew.pl
too_many
too_unseen
restriction
overdue
recalled
on_reserve
too_soon

'too_unseen' for staff actually feels wrong as well, staff side renewals will
succeed, but passing this is useful in that it reminds staff they are supposed
to 'see' the item?

Bug 34924 will have an effect here too, and I think there are rabbit holes all
around this because sometimes the 'error' is trying to give information, and
sometimes actually blocking (like the too_unseen above)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list