Koha/koha-tmpl/intranet-tmpl/prog/en/includes
Kyle M Hall 80897930b7 Bug 2720 - Overdues which debar automatically should undebar automatically when returned
This patch adds a more extensible and flexible debarments system to Koha. The fields
borrowers.debarred and borrowers.debarredcomment are retained for compatibility and
speed.

This system supports having debarments for multiple reasons. There are currently
three types of debarments:
OVERDUES    - Generated by overdue_notices.pl if the notice should debar a patron
SUSPENSION  - A punative debarment generated on checkin via an issuing rule
MANUAL      - A debarment created manually by a librarian

OVERDUE debarments are cleared automatically when all overdue items have been returned,
if the new system preference AutoRemoveOverduesRestrictions is enabled. It is disabled
by default to retain current default functionality.

Whenever a borrowers debarments are modified, the system updates the borrowers debarment
fields with the highest expiration from all the borrowers debarments, and concatenates
the comments from the debarments together.

Test plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Verify the borrower_debarments table has been created and
    populated with the pre-existing debarments
 4) Run t/db_dependent/Borrower_Debarments.t
 5) Manually debar a patron, with an expiration date
 6) Verify the patron cannot be issued to
 7) Add another manual debarment with a different expiration date
 8) Verify the 'restricted' message lists the date farthest into the future
 9) Add another manual debarment with no expiration date
10) Verify the borrower is now debarred indefinitely
11) Delete the indefinite debarment
12) Verify the debarment message lists an expiration date dagain
13) Enable the new system preference AutoRemoveOverduesRestrictions
14) Set an overdue notice to debar after 1 day of being overdue
15) Check out an item to a patron and backdate the due date to yesterday
16) Run overdue_notices.pl
17) Verify the OVERDUES debarment was created
18) Return the item
19) Verify the OVERDUES debarment was removed
20) Disable AutoRemoveOverduesRestrictions
21) Repeat steps 15 though 18, verify the OVERDUES debarment was *not* removed
22) Add issuing rules so that an overdue item causes a temporary debarment
23) Check out an item to a patron and backdate the due date by a year
24) Return the item
25) Verify the SUSPENSION debarment was added to the patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:53:22 +00:00
..
csv_headers/acqui Bug 10935: fix breakage of CSV acq exports when using a non-English translation 2013-10-17 17:02:28 +00:00
virtualshelves/merge
acquisitions-add-to-basket.inc Bug 10737: Add "Add to basket" link on vendor search results page 2013-09-05 15:28:31 +00:00
acquisitions-menu.inc
acquisitions-search.inc Bug 10115 - Hiding advanced search in Orders search tab removes plus button 2013-04-26 07:53:49 -04:00
acquisitions-toolbar.inc
additem.js.inc Bug 10576: make strings in additem.js accessible to translation 2013-07-22 15:40:21 +00:00
admin-menu.inc
auth-finder-search.inc Bug 9282: (follow-up) add authtypecode to authority auto-completion search 2013-10-10 22:26:45 +00:00
authorities-search-results.inc Bug 10335: display translated forms of headings in UNIMARC authorities correctly 2013-10-10 19:14:44 +00:00
authorities-search.inc
authorities-toolbar.inc Bug 10096: (follow-up) rename button on authorities toolbar 2013-10-04 15:06:15 +00:00
authorities.inc
authorities_js.inc Bug 5202: merge authorities from the authority file and reservoir 2013-10-10 21:32:27 +00:00
biblio-default-view.inc
biblio-view-menu.inc
borrower_debarments.inc Bug 2720 - Overdues which debar automatically should undebar automatically when returned 2013-10-31 01:53:22 +00:00
browser-strings.inc Bug 10404: add previous/next browsing to staff client 2013-08-09 15:07:39 +00:00
budgets-active-currency.inc
budgets-admin-search.inc
budgets-admin-toolbar.inc
calendar.inc Bug 9508: Standardize the dateformat value from C4::Auth 2013-05-20 09:05:01 -07:00
cat-menu.inc
cat-search.inc
cat-toolbar.inc Bug 10597: fix Search to hold button on record details page 2013-07-18 13:57:53 +00:00
cataloging-search.inc
checkin-search.inc
checkouts-table-footer.inc
circ-menu.inc Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber 2013-10-14 21:08:02 +00:00
circ-menu.tt Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber 2013-10-14 21:08:02 +00:00
circ-search.inc
cities-admin-search.inc
contracts-admin-search.inc
currencies-admin-search.inc
datatables-strings.inc Bug 5766 - Add configuration for excluding articles from DataTables sorting 2013-07-08 15:37:02 +00:00
datatables.inc Bug 10649 - Upgrade DataTables and move scripts out of theme directory 2013-09-05 15:43:36 +00:00
date-format.inc Bug 9508: Standardize the dateformat value from C4::Auth 2013-05-20 09:05:01 -07:00
doc-head-close-receipt.inc Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
doc-head-close.inc Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
doc-head-open.inc
facets.inc Bug 11099: fixed bug in Label in Staff Client - series on facets not easily css selectable 2013-10-22 05:21:22 +00:00
file-upload.inc
form-blocks.inc
greybox.inc
guided-reports-view.inc
header.inc Bug 10888: Don't hide authorities module from users who lack permission to edit authorities 2013-09-21 17:59:05 +00:00
help-bottom.inc
help-top.inc Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
home-search.inc
installer-doc-head-close.inc Bug 2774 - Path to theme is hard-coded in many places 2013-06-07 09:04:15 -07:00
intranet-bottom.inc
intranetstylesheet.inc Bug 10052 Followup for edithelp.tt and help-top.inc 2013-05-23 08:55:11 -07:00
labels-menu.inc
labels-toolbar.inc
letters-search.inc
members-menu.inc
members-toolbar.inc Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission 2013-10-22 12:48:39 +00:00
merge-record-strings.inc Bug 10650 - export merge-record.inc javascript into a file 2013-09-16 16:17:34 +00:00
merge-record.inc Bug 10650 - export merge-record.inc javascript into a file 2013-09-16 16:17:34 +00:00
messaging-preference-form.inc Bug 10511: (follow-up) jQuery .removeAttr() has only one parameter 2013-08-12 14:12:38 +00:00
page-numbers.inc
patron-search-box.inc Bug 10406: memove div and more obsolete CSS related to YUI autocomplete 2013-06-12 07:24:30 -07:00
patron-search.inc Bug 8845 - Add ability search patrons by date of birth - Add tooltip 2013-05-30 08:20:08 -07:00
patron-title.inc
patron-toolbar.inc
patroncards-errors.inc Bug 9924: (follow-up) ensure that correct error message is displayed 2013-09-08 19:19:50 +00:00
patroncards-menu.inc
patroncards-toolbar.inc
patrons-admin-search.inc
popup-bottom.inc
prefs-admin-search.inc
prefs-menu.inc
printers-admin-search.inc
quotes-toolbar.inc
quotes-upload-toolbar.inc
reports-menu.inc
reports-toolbar.inc
resort_form.inc
roadtype-admin-search.inc
search_indexes.inc Bug 10755 - Add "Keyword as Phrase" to staff client advanced search indexes 2013-09-04 14:25:47 +00:00
serials-menu.inc Bug 7688: Change subscription numbering pattern and frequencies 2013-10-30 00:29:38 +00:00
serials-search.inc
serials-toolbar.inc
stopwords-admin-search.inc
subscriptions-search.inc Bug 5343: Link serial and acqui modules 2013-03-22 23:54:43 -04:00
subtypes_unimarc.inc Bug 8252: Fix indexing of UNIMARC 1xx for GRS-1 2013-10-10 15:06:10 +00:00
suggestions-add-search.inc
tools-item-action.inc Bug 7131: teach MARC import how to overlay items 2013-10-30 04:31:07 +00:00
tools-menu.inc Bug 10565: (follow-up) improve navigation aids 2013-10-14 22:43:03 +00:00
tools-nomatch-action.inc
tools-overlay-action.inc
validator-strings.inc Bug 6209 follow-up, make strings translatable 2013-03-23 00:12:59 -04:00
vendor-menu.inc
virtualshelves-toolbar.inc
z3950-admin-search.inc Bug 10307 - z39.50 server search tab shows z390.50 2013-06-04 11:41:10 -07:00