Bug 36341 - "Hold starts on date" should be limited to future dates
Summary: "Hold starts on date" should be limited to future dates
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-18 11:34 UTC by Martin Renvoize
Modified: 2024-04-04 13:25 UTC (History)
2 users (show)

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


Attachments
Bug 36341: Add futureinclusive to future holds (3.63 KB, patch)
2024-03-18 11:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36341: Add futureinclusive to future holds (3.68 KB, patch)
2024-04-01 17:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 36341: (QA follow-up) Use future inclusive on staff side too (1.34 KB, patch)
2024-04-01 17:34 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 Martin Renvoize 2024-03-18 11:34:51 UTC
For some reason we don't appear to limit the date selection yet available in the OPAC 'Hold starts on date'.. it should only allow future dates.
Comment 1 Martin Renvoize 2024-03-18 11:40:00 UTC
Created attachment 163309 [details] [review]
Bug 36341: Add futureinclusive to future holds

This patch adds the flatpickr-futureinclusive data to the input field
for "Hold starts on date" in the OPAC.

We also add 'flatpickr-future' data to the input field for expiration
date as it also doesn't make sense to allow this to be a past data
either.

Test plan
1) Attempt to place a hold on an item from the OPAC
2) Expand the 'Show more options' dropdown
3) Note that without the patch 'Hold not needed after' allows setting to
   a date in the past.
4) Enable `AllowHoldDateInFuture` and `OPACAllowHoldDateInFuture` system
   preferences
5) The 'Hold starts on date' option should now appear if you refresh
   your hold placing page in the OPAC.
6) Note that the above input also allows setting a past date
7) Apply patch
8) Neith input should allow past dates now.
Comment 2 Nick Clemens 2024-04-01 17:34:26 UTC
Created attachment 164218 [details] [review]
Bug 36341: Add futureinclusive to future holds

This patch adds the flatpickr-futureinclusive data to the input field
for "Hold starts on date" in the OPAC.

We also add 'flatpickr-future' data to the input field for expiration
date as it also doesn't make sense to allow this to be a past data
either.

Test plan
1) Attempt to place a hold on an item from the OPAC
2) Expand the 'Show more options' dropdown
3) Note that without the patch 'Hold not needed after' allows setting to
   a date in the past.
4) Enable `AllowHoldDateInFuture` and `OPACAllowHoldDateInFuture` system
   preferences
5) The 'Hold starts on date' option should now appear if you refresh
   your hold placing page in the OPAC.
6) Note that the above input also allows setting a past date
7) Apply patch
8) Neith input should allow past dates now.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens 2024-04-01 17:34:28 UTC
Created attachment 164219 [details] [review]
Bug 36341: (QA follow-up) Use future inclusive on staff side too
Comment 4 Nick Clemens 2024-04-01 17:34:40 UTC
Trivial fix, PQA
Comment 5 Katrin Fischer 2024-04-04 13:25:39 UTC
Pushed for 24.05!

Well done everyone, thank you!