]> git.koha-community.org Git - koha.git/commit
Bug 26937: Add an optional delay to the CheckPrevCheckout syspref.
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 23 Jul 2020 14:24:39 +0000 (16:24 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Mar 2021 14:14:22 +0000 (15:14 +0100)
commit5a31f88d52f5ab88c561f9cca6025ef7ae51dc74
tree928ec321a885de6febdac8c5760e34415b68b969
parent86918091118d1e2ead99a943dfe783c7f1740789
Bug 26937: Add an optional delay to the CheckPrevCheckout syspref.

The CheckPrevCheckout allows to check a borrower's checkout history to see if
the current item has been checked out before.

This patch adds an optional syspref: CheckPrevCheckoutDelay

It allows to specify the maximum number of days since the last checkin
that will trigger CheckPrevCheckout's warning.

Test plan:

 - Apply the patch.

 - Set CheckPrevCheckout to "Do" and CheckPrevCheckoutDelay to n.

 - Checkout and check-in an item for a patron.

 - Try to checkout the same item.

 - Check that you have a warning:
   "Patron has previously checked out this title: Check out anyway?"

 - Update the returndate column from the old_issues table to have a returndate
   older than n days ago.

 - Try to checkout the same item.

 - Check that you don't have the warning.

 - Prove t/db_dependent/Patron/Borrower_PrevCheckout.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patron.pm
installer/data/mysql/atomicupdate/Bug26937.perl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
t/db_dependent/Patron/Borrower_PrevCheckout.t