]> git.koha-community.org Git - koha.git/commit
Bug 16344: Add a circ rule to limit the auto renewals given a specific
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 25 Apr 2016 20:52:27 +0000 (21:52 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Apr 2017 13:15:21 +0000 (09:15 -0400)
commitd3e459289f9e9b2ee4a138693d855e829a9b0a82
tree48a344c9a845c1795a5813a66a318e905688450d
parentb492182b69e353f4f08d227b1ec7525a23bd6fe0
Bug 16344: Add a circ rule to limit the auto renewals given a specific

This patch adds a new circulation rule (no_auto_renewal_after_hard_limit) to block/allow
auto renewals after a given date.
The idea is to stop renewals at a given date. That way the library will have
time to send overdues and get the books back before the students do on holiday.

Test plan:
0/ Execute the update DB entry
1/ Define a rule with no_auto_renewal_after_hard_limit set to tomorrow
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed
4/ Modify the no_auto_renewal_after_hard_limit and set it to yesterday
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Circulation.pm
admin/smart-rules.pl
installer/data/mysql/atomicupdate/bug_16344.sql [new file with mode: 0644]
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
t/db_dependent/Circulation.t