The patron information documentation:
at section 9.2.1. Circulation Summary
Says "The Restrictions tab will show for all patrons. If the patron has no restrictions you will see that on the tab."
"If the patron has restrictions on their account the tab will show the number and the description."
There is no discussion of 'OVERDUE' restrictions, or the fact that this restriction may be automatically removed if the overdue items are checked back in if the AutoRemoveOverduesRestrictions system preference is set to "[Do] allow OVERDUES restrictions triggered by sent notices to be cleared automatically when all overdue items are returned by a patron."
It is also unclear from the documentation what is being restricted:
* Are checkouts restricted? [presumably]
* Are renewals restricted?
* If renewals are restricted, how does this interact with AutoRemoveOverduesRestrictions? Are renewals restricted except when AutoRemoveOverduesRestrictions is set to "Do"?
It may be that this would be better documented in http://manual.koha-community.org/3.16/en/administration.html#globalsysprefs
but there should at least be a link from the documentation of the restrictions tab to documentation of that syspref.
It would probably also be helpful to point to
So I wrote most of the section on restrictions. The only thing left is the consequences of restrictions. Sometimes it blocks checkout, sometimes it doesn't block checkouts. And I can't find the logic.
The four types of restrictions are:
- Manual (go in and add a restriction manually)
- Discharge (restriction added when creating a discharge in the user's record)
- Suspension (restriction added when overdue material is returned and circ rules state that user must be suspended for X days)
- Overdues (restriction is added when overdue notice is sent and it is specified to restrict users)
Manual restrictions can have expiration dates or not.
Discharge restrictions are indefinite (no expiration date).
Suspension restrictions have expiration dates.
Overdues restrictions are indefinite (or until materials are returned if AutoRemoveOverduesRestrictions is on).
I've tried to read the code to see the conditions when checkouts would be allowed even if the patron is restricted, but I'm not a programmer so I don't understand much of it.
Can someone help me?
My contributions are here : https://gitlab.com/carolinecyrlarose/koha-manual/commits/bz_13228
Created attachment 78159 [details]
perldoc for Koha/Patron/Debarments.pm
(In reply to Caroline Cyr La Rose from comment #2)
> My contributions are here :
I've CC'd Kyle Hall, he added the Koha::Patron::Debarments.pm, which is the back-end code that handles patron restrictions. He should have some insights aboutwhere that code is called. I'm attaching 'Debarments.txt', which contains the programmer's documentation for that module. The borrower debarments library won't tell you where the code is called, but it should give a programmer the right bread crumbs to be able to find out.
I can't go down this path myself right now, but if you haven't gotten any responses by the middle of next week, let me know, and I'll try and make some time to look at this.
I don't know what was wrong before. I retested and everything works perfectly.