]> git.koha-community.org Git - koha.git/commit
Bug 32627: Calculate expirationdate relative to waitingdate
authoremlam <emily.lamancusa@montgomerycountymd.gov>
Wed, 5 Apr 2023 13:30:30 +0000 (09:30 -0400)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 15 Jun 2023 19:08:38 +0000 (19:08 +0000)
commit29215f48ddf9b7083c0566670d85fe7959993221
treeb25d1263cdc65ec1e76a154ac3ca60c70fde3222
parent387fddf99926905f5d12bb02dff7ec4ef48abaca
Bug 32627: Calculate expirationdate relative to waitingdate

Hold::set_waiting should calculate the MaxPickupDelay expiration date
based on waitingdate rather than the current date, to avoid resetting
the expirationdate on a hold that was already waiting.

To test:
1. Place a hold and check in the item so the hold will be set to Waiting
2. Confirm that the expiration date is correct based on the
   ReservesMaxPickupDelay setting
3. Adjust your system clock to one day later
4. Check in the item again and confirm the hold
5. Note that the expiration date has changed
7. Apply patch and restart_all
8. Repeat steps 1-4. Confirm that the expiration date is calculated
   correctly, and does not change when the item is checked in again
9. Reset your system clock to the current date
10. Set ExcludeHolidaysFromMaxPickupDelay to Use the Calendar
11. Add an upcoming holiday to the calendar
12. Repeat steps 1-4. Confirm the expiration date correctly accounts for
    the holiday, and does not change when the item is checked in again

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21bcb6e85520b2963dde71c21ccb5e169c4c5e28)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 276bd9af4b9b64b1c5f870c7b59f33039f7e28fa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Hold.pm