]> git.koha-community.org Git - koha.git/commit
Bug 12063: Change date calculation for reserve expiration to skip all holiday
authorAlex Arnaud <alex.arnaud@biblibre.com>
Mon, 20 Jun 2016 09:52:37 +0000 (11:52 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 9 May 2017 12:59:39 +0000 (08:59 -0400)
commit7cf3c12f5bd2a4a4acb7162e7b3297dbe492350e
tree2ec73cb84275f9c82e225ea4bfa16e7db62edacd
parent89c0ecef47e34f151e10ebfb2e3cc927ecaa93f3
Bug 12063: Change date calculation for reserve expiration to skip all holiday

This patch makes koha automatically set expiration date when reserves become
waitting. Also it adds a new syspref "ExcludeHolidaysFromMaxPickUpDelay" that allows to
take holidays into account while calculating expiration date.

Test plan:

  - Install this patch and run updatedatabase.pl script,
  - allow ExpireReservesMaxPickUpDelay in system preferences,
  - set ReservesMaxPickUpDelay to 5.

  - Place an hold on a checked out item and check in this item:
    The hold's expiration date should be today + 5.

  - Allow ExcludeHolidaysFromMaxPickUpDelay in system preferences,
  - add holiday during this pickup delay period,
  - Create a new hold and make it comes waitting:
    The hold's expiration date should be today + 5 + number of closed
    day(s).

Also:
  - Check that ExpireReservesOnHolidays syspref works again
    without ExcludeHolidaysFromMaxPickUpDelay.
  - Check that cancel fees apply again if wanted.

Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Reserves.pm
Koha/Calendar.pm
Koha/Hold.pm
installer/data/mysql/atomicupdate/bug_12063-add_excludeholidaysfrommaxpickupdelay_syspref.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
t/db_dependent/Holds.t
t/db_dependent/Holds/CancelReserves.t [new file with mode: 0644]
t/db_dependent/Holds/WaitingReserves.t [new file with mode: 0644]