Created attachment 82109 [details] with both restriction and fine, checkout box is visible. Prior behavior: when a patron has a restriction added to their account, the ability of checking out has been removed. The checkout box is replaced by a "View restriction" box and an "Override Restriction Temporarily" box option. If Override is chosen, then the patron's checkout box will reappear for that session. Currently in Koha 18.05.05, when a patron has a restriction, this behavior described above happens correctly. However, if a patron also has a fine of a dollar amount in addition to the restriction, the checkout box is now visible allowing checkouts to occur. The fine/fee amount can be any amount- this does not seem to correlate with the noissuecharge system preference. For an example, system preference Noissuecharge set at 20.00, the value of $2.00 fine was attached to the patron and a restriction, the checkout box still appeared. If a fine/fee was above the noissuecharge, this same behavior occurred- the checkout box appears. See screenshot of bug.
Confirmed on master, having a look.
Did git bisect for the fun of it... lead me here: commit bddfed75913a2302c19c00b00a6fe86538af6f9f Author: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Date: Sun Jan 7 14:57:23 2018 -0300 Bug 19933: Remove patronflags - tricky ones
I think the problem is here: $noissues = ( not C4::Context->preference("AllowFineOverride") and ( $owing > $noissuescharge ) ); It can reset noissues, even if it has already been set to 1 before.
Created attachment 82121 [details] [review] Bug 21796: Don't unlock checkouts if restriction exists but fines are below limit The checkout form will be removed if various conditions are met: Restrictions, a fine above noissuescharge etc. Bug 19933 changed the conditions, so a restriction will no longer block checkouts, if the fines are below the set limit. To test: - Add a restriction - Confirm the checkouts form is replaced by a message - Add a fine below the noissuescharge limit - Confirm that the form reappears - Apply the patch - Check that the checkout form is gone now - Remove restriction - form should reappear - Add to the fine, so it's above the limit - Form should disappear
It works, but I saw the form at the final step because AllowFineOverride was set at "Allow". That's just a remainder for future reviewers.
Created attachment 82201 [details] [review] Bug 21796: Don't unlock checkouts if restriction exists but fines are below limit The checkout form will be removed if various conditions are met: Restrictions, a fine above noissuescharge etc. Bug 19933 changed the conditions, so a restriction will no longer block checkouts, if the fines are below the set limit. To test: - Add a restriction - Confirm the checkouts form is replaced by a message - Add a fine below the noissuescharge limit - Confirm that the form reappears - Apply the patch - Check that the checkout form is gone now - Remove restriction - form should reappear - Add to the fine, so it's above the limit - Form should disappear Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
(In reply to Pierre-Marc Thibault from comment #5) > It works, but I saw the form at the final step because AllowFineOverride was > set at "Allow". That's just a remainder for future reviewers. Thx for pointing this out!
Created attachment 82377 [details] [review] Bug 21796: Don't unlock checkouts if restriction exists but fines are below limit The checkout form will be removed if various conditions are met: Restrictions, a fine above noissuescharge etc. Bug 19933 changed the conditions, so a restriction will no longer block checkouts, if the fines are below the set limit. To test: - Add a restriction - Confirm the checkouts form is replaced by a message - Add a fine below the noissuescharge limit - Confirm that the form reappears - Apply the patch - Check that the checkout form is gone now - Remove restriction - form should reappear - Add to the fine, so it's above the limit - Form should disappear Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.07
Depends on Bug 19933 not in 17.11.x
This is sort of moot, since this is already resolved, but it looks like this bug isn't/wasn't actually allowing checkout. Koha gives you a checkout box, but when you actually try to check something out it blocks it, tells you the patron has a restriction, and doesn't give an override option.