Bug 31356: Use hold expiration date instead of adding days to the waiting date
authorNick Clemens <nick@bywatersolutions.com>
Fri, 12 Aug 2022 16:19:49 +0000 (16:19 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 31 Aug 2022 17:30:26 +0000 (14:30 -0300)
commitf6a08737c9ad9c85e98887e3a55cf31029c5a8c8
tree29c020898c9209d37a89d88d196ae43f943a9a65
parent994ad3bcfd38993fd72e94a1c8f0a7c2041d0414
Bug 31356: Use hold expiration date instead of adding days to the waiting date

The Talking Tech outbound script currently just adds the
ReservesMaxPickUpDelay to the waiting date to calculate the
"expiration date", but it should use the actual hold expiration
date which may differ from this naive calculation based on
various system preference values.

Test Plan:
1) Create a holiday for tomorrow
2) Set ReservesMaxPickUpDelay to 5
3) Set "Days mode" to "Same week day"
4) Enable ExcludeHolidaysFromMaxPickUpDelay
5) Enable TalkingTechItivaPhoneNotification
6) Create a hold and fill the hold so it is waiting
7) Enable "Hold filled" phone notices for that patron
8) Create a 'phone' version of the HOLD notice
9) Run ./misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type RESERVE -w 0
10) Note the output has the expiration date ( 15th colume ) 5 days from now which is *not* the hold's expiration date
11) Apply this patch
12) Repeat the command from step 9
13) Note the expiration date column now matches the holds actual expiration date!

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl