Koha/misc/cronjobs
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
..
holds bug_5911: Transport Cost Matrix 2012-09-12 14:49:25 +02:00
rss Bug 5370: Fix all references to koha.org 2010-11-08 09:41:47 +13:00
social_data Bug 10156 - Fix usr/bin/perl path for get_report_social_data.pl 2013-05-08 09:52:21 -04:00
thirdparty Bug 8606 - Talking Tech broken by Bug 7001 2012-09-20 14:12:41 +02:00
advance_notices.pl Bug 9499 - --itemscontent= option is undocumented in advanced-notice.pl cronjob + default date should be date_due, not issuedate 2013-02-07 19:44:50 -05:00
backup.sh Bug 9235 - Hardcoded values in cronjobs/backup.sh 2012-12-21 07:20:50 -05:00
batch_anonymise.pl Bug 6506: When AnonymousPatron not set, deletion of issue history silently failed. 2013-05-01 08:44:11 -04:00
build_browser_and_cloud.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
cart_to_shelf.pl 7368 Typo in cart_to_shelf 2012-03-16 11:50:29 +01:00
check-url-quick.pl Bug 7963 follow-up: die nicely if AnyEvent libraries not installed 2012-10-05 11:44:56 +02:00
check-url.pl Bug 7963 Parallel HTTP requests when checking URLs 2012-10-05 11:44:52 +02:00
cleanup_database.pl Bug 10361: Add option to cleanup_database.pl to purge OPAC search history 2013-09-04 14:22:50 +00:00
cloud-kw.pl Bug 5385: POD Cleanups (part 2) 2010-11-12 10:06:56 +13:00
cloud-sample.conf
CONFIGURE.gmail Bug 5251 : Enhancement: [3.2] (Resubmission) Adding code to support using gmail as an SMTP server 2011-04-08 14:01:15 +12:00
create_koc_db.pl
crontab.example Bug 8741 - crontab.example missing username, fails in some systems 2012-10-09 17:55:12 +02:00
delete_expired_opac_registrations.pl Bug 7067: Followup FIX QA fails 2012-12-14 08:09:00 -05:00
delete_patrons.pl bug 10419: (follow-up) improvements to the usage text 2013-10-03 22:13:40 +00:00
delete_unverified_opac_registrations.pl Bug 7067: Followup FIX QA fails 2012-12-14 08:09:00 -05:00
fines.pl Bug 9671: Make fines.pl help text more accurate 2013-04-26 18:35:40 -04:00
gather_print_notices.pl Bug 10727: Replace carriage return with <br /> when printing hold notices 2013-09-06 16:52:59 +00:00
import_webservice_batch.pl Bug 7475: Teach matching rules to handle authorities 2012-09-19 17:15:56 +02:00
j2a.pl Bug 7157 follow-up: j2a.pl executable again 2012-01-27 12:18:25 +01:00
longoverdue.pl Bug 7639: add option to forgive overdue fines when declaring items lost 2013-09-17 15:10:46 +00:00
MARC21_parse_test.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
overdue_notices.pl Bug 2720 - Overdues which debar automatically should undebar automatically when returned 2013-10-31 01:53:22 +00:00
printoverdues.sh Bug 10127 : Printoverdues.sh should tar only pdf files 2013-07-16 15:47:13 +00:00
process_message_queue.pl Bug 5251 : Enhancement: [3.2] (Resubmission) Adding code to support using gmail as an SMTP server 2011-04-08 14:01:15 +12:00
purge_suggestions.pl Bug 5944 : (MT #3000) new cronjob script to delete old suggestions 2011-03-24 22:10:20 +13:00
runreport.pl Bug 9033: Wide character error in runreport.pl 2012-12-12 07:26:52 -05:00
serialsUpdate.pl Bug 9739: (follow-up) improve help text a bit 2013-10-20 18:57:19 +00:00
services_throttle.pl
staticfines.pl Bug 8420: tool statisticfines.pl and hourly loan 2012-09-14 16:19:25 +02:00
update_totalissues.pl Bug 6557: Record bib popularity in totalissues 2012-06-29 14:29:22 +02:00