Bug 13228

Summary: Documentation of 'restrictions' tab does not show "OVERDUE" restriction
Product: Koha Reporter: Barton Chittenden <barton>
Component: DocumentationAssignee: Caroline Cyr La Rose <caroline.cyr-la-rose>
Status: RESOLVED MOVED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, kyle
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: perldoc for Koha/Patron/Debarments.pm

Description Barton Chittenden 2014-11-10 19:50:46 UTC
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 AutoRemoveOverduesRestrictions

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

Comment 1 Caroline Cyr La Rose 2018-08-24 21:59:22 UTC
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?
Comment 2 Caroline Cyr La Rose 2018-08-24 22:06:09 UTC
My contributions are here : https://gitlab.com/carolinecyrlarose/koha-manual/commits/bz_13228
Comment 3 Barton Chittenden 2018-08-24 22:28:08 UTC
Created attachment 78159 [details]
perldoc for Koha/Patron/Debarments.pm
Comment 4 Barton Chittenden 2018-08-24 22:34:46 UTC
(In reply to Caroline Cyr La Rose from comment #2)
> My contributions are here :
> https://gitlab.com/carolinecyrlarose/koha-manual/commits/bz_13228


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.

Comment 5 Caroline Cyr La Rose 2018-09-21 21:28:00 UTC
I don't know what was wrong before. I retested and everything works perfectly.