Bug 31356 - Itiva outbound script doesn't respect calendar when calculating expiration date for holds
Summary: Itiva outbound script doesn't respect calendar when calculating expiration da...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-12 16:15 UTC by Nick Clemens
Modified: 2022-11-18 01:19 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.07, 21.11.14


Attachments
Bug 31356: Pass expirationdate through itiva script (2.49 KB, patch)
2022-08-12 16:20 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31356: Use hold expiration date instead of adding days to the waiting date (3.49 KB, patch)
2022-08-12 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31356: Use hold expiration date instead of adding days to the waiting date (3.54 KB, patch)
2022-08-12 18:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31356: Use hold expiration date instead of adding days to the waiting date (3.68 KB, patch)
2022-08-28 17:02 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-08-12 16:15:19 UTC
The script takes the waiting date and adds the delay

It should simply pass through the expiration date field
Comment 1 Nick Clemens 2022-08-12 16:20:11 UTC
Created attachment 139070 [details] [review]
Bug 31356: Pass expirationdate through itiva script
Comment 2 Kyle M Hall 2022-08-12 18:20:44 UTC
Created attachment 139071 [details] [review]
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!
Comment 3 Kyle M Hall 2022-08-12 18:21:21 UTC
Created attachment 139072 [details] [review]
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>
Comment 4 Joonas Kylmälä 2022-08-28 17:02:00 UTC
Created attachment 139929 [details] [review]
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>
Comment 5 Tomás Cohen Arazi 2022-08-31 17:37:22 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass 2022-10-31 19:16:42 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 7 Arthur Suzuki 2022-11-14 11:11:55 UTC
applied to 21.11.x for 21.11.14
Comment 8 Victor Grousset/tuxayo 2022-11-18 01:19:45 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.