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: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
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-12-12 21:25 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.03,21.05.11


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
Bug 21652: Unit test (1.31 KB, patch)
2022-01-20 10:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21652: Only set waitingdate to today if there is no waitingdate already (1.36 KB, patch)
2022-01-20 10:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21652: Simplify code (2.02 KB, patch)
2022-01-20 10:25 UTC, Jonathan Druart
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>
Comment 11 Jonathan Druart 2022-01-20 10:24:56 UTC
Created attachment 129635 [details] [review]
Bug 21652: Unit test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2022-01-20 10:25:00 UTC
Created attachment 129636 [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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2022-01-20 10:25:05 UTC
Created attachment 129637 [details] [review]
Bug 21652: Simplify code

And add a test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Fridolin Somers 2022-01-29 07:53:56 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 15 Kyle M Hall 2022-02-07 15:46:17 UTC
Pushed to 21.11.x for 21.11.03
Comment 16 Andrew Fuerste-Henry 2022-02-21 15:21:03 UTC
Pushed to 21.05.x for 21.05.11
Comment 17 Victor Grousset/tuxayo 2022-02-24 22:32:40 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.