Bug 21652 - reserves.waitingdate is set to current date by printing new hold slip
Summary: reserves.waitingdate is set to current date by printing new hold slip
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-24 20:52 UTC by Andrew Fuerste-Henry
Modified: 2022-01-14 14:20 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21652: Only set waitingdate to today if there is no waitingdate already (1.22 KB, patch)
2022-01-06 15:20 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 21652: Only set waitingdate to today if there is no waitingdate already (1.28 KB, patch)
2022-01-06 16:05 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 21652: Unit test (1.23 KB, patch)
2022-01-14 14:20 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 21652: Only set waitingdate to today if there is no waitingdate already (1.28 KB, patch)
2022-01-14 14:20 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2018-10-24 20:52:13 UTC
To test:
- Find or create a hold with a waitingdate other than today
- Check the item in to generate a new hold alert
- Select "Confirm and Print"
- Verify that the waiting date has changed to the current date

The waiting date does not change if you select "Confirm" rather than "Confirm and Print." 

This causes confusion as it puts the waiting date out of sync with the expiration date. In fact, if ExpireReservesMaxPickUpDelay is off and expired holds must be cancelled manually, a new hold slip can be printed after the cancellation date, causing the hold to show a waiting date after its expiration date.
Comment 1 Katrin Fischer 2019-11-02 15:08:42 UTC
Hi Andrew, can you confirm this is still an issue in newer versions? 17.11 is on longer maintained.
Comment 2 Andrew Fuerste-Henry 2019-11-04 13:46:37 UTC
Confirmed this issue still exists in 19.05. Thanks!
Comment 3 Daniel Gaghan 2020-01-28 19:08:58 UTC
PCCLD is seeing this bug too in 19.05.
Comment 4 Lucy Vaux-Harvey 2020-02-25 11:13:35 UTC
We have a customer experiencing the same issue on 18.11.04.
Comment 5 Lucas Gass 2022-01-05 19:11:49 UTC
confirmed that this issue still exists in master
Comment 6 Lucas Gass 2022-01-06 15:20:02 UTC
Created attachment 129099 [details] [review]
Bug 21652: Only set waitingdate to today if there is no waitingdate already

1- Find or create a hold with a waitingdate other than today
2- Check the item in to generate a new hold alert
3- Select "Confirm and Print"
4- Verify that the waiting date has changed to the current date
5- Apply patch
6- Try 1-3 again, if a waitingdate already exists it should not change
7. Try an item with no waitingdate, it should properly update to today
Comment 7 Andrew Fuerste-Henry 2022-01-06 16:05:24 UTC
Created attachment 129100 [details] [review]
Bug 21652: Only set waitingdate to today if there is no waitingdate already

1- Find or create a hold with a waitingdate other than today
2- Check the item in to generate a new hold alert
3- Select "Confirm and Print"
4- Verify that the waiting date has changed to the current date
5- Apply patch
6- Try 1-3 again, if a waitingdate already exists it should not change
7. Try an item with no waitingdate, it should properly update to today

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 8 Jonathan Druart 2022-01-07 15:21:55 UTC
Unit tests are missing.

Note that you could simply have a 1 line patch with:
  waitingdate => $self->waitingdate || $today->ymd,
Comment 9 Nick Clemens 2022-01-14 14:20:22 UTC
Created attachment 129484 [details] [review]
Bug 21652: Unit test
Comment 10 Nick Clemens 2022-01-14 14:20:26 UTC
Created attachment 129485 [details] [review]
Bug 21652: Only set waitingdate to today if there is no waitingdate already

1- Find or create a hold with a waitingdate other than today
2- Check the item in to generate a new hold alert
3- Select "Confirm and Print"
4- Verify that the waiting date has changed to the current date
5- Apply patch
6- Try 1-3 again, if a waitingdate already exists it should not change
7. Try an item with no waitingdate, it should properly update to today

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>