Bug 31261 - Curbside pickups - remove slots in the past
Summary: Curbside pickups - remove slots in the past
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement with 3 votes (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 30650 32111
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-29 14:31 UTC by Jonathan Druart
Modified: 2023-06-08 22:28 UTC (History)
2 users (show)

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


Attachments
Bug 31261: Disable dates in the past for curbside pickups (6.43 KB, patch)
2022-07-31 07:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31261: Disable dates in the past for curbside pickups (6.45 KB, patch)
2022-11-04 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31261: Introduce flatpickr-futureinclusive (6.42 KB, patch)
2022-11-04 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31261: Disable dates in the past for curbside pickups (6.49 KB, patch)
2022-11-04 12:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 31261: Introduce flatpickr-futureinclusive (6.46 KB, patch)
2022-11-04 12:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 31261: Disable dates in the past for curbside pickups (6.54 KB, patch)
2022-11-13 13:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31261: Introduce flatpickr-futureinclusive (6.52 KB, patch)
2022-11-13 13:11 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-07-29 14:31:17 UTC
We are displaying all the dates from the date picker widget, we should display future dates only.
Comment 1 Jonathan Druart 2022-07-31 07:48:43 UTC
Created attachment 138406 [details] [review]
Bug 31261: Disable dates in the past for curbside pickups

When creating a new pickup the dates in the past won't display any
available slots. It would be better to disable them in the date picker.

Test plan:
Setup curbside pickups for your library (see bug 30650 test plan if
needed)
Create a new pickup (staff and OPAC) and confirm that the date picker widget
has the dates in the past disabled.

QA note: More work would be needed to sync calendar.inc code between
OPAC and staff. Also note that the "clear date" code wasn't needed
(please confirm).

Sponsored-by: Association KohaLa - https://koha-fr.org/
Comment 2 Katrin Fischer 2022-07-31 20:47:06 UTC
I have configured from 1:00 to 23:55 with 10 minute slots, but I can no longer pick pickup slots from today in the calendar. OPAC and staff show the same behaviour.
Comment 3 Jonathan Druart 2022-08-08 08:21:00 UTC
Well, yes, that's what the bug said :)
It was misleading then, and it means we need way more code for this edge case.
Comment 4 Katrin Fischer 2022-08-08 12:42:09 UTC
I am not sure if it's intended to be able to schedule for today,... but in testing it made sense and could have been a few hours away.
Comment 5 Jonathan Druart 2022-11-04 12:38:17 UTC
Created attachment 143182 [details] [review]
Bug 31261: Disable dates in the past for curbside pickups

When creating a new pickup the dates in the past won't display any
available slots. It would be better to disable them in the date picker.

Test plan:
Setup curbside pickups for your library (see bug 30650 test plan if
needed)
Create a new pickup (staff and OPAC) and confirm that the date picker widget
has the dates in the past disabled.

QA note: More work would be needed to sync calendar.inc code between
OPAC and staff. Also note that the "clear date" code wasn't needed
(please confirm).

Sponsored-by: Association KohaLa - https://koha-fr.org/
Comment 6 Jonathan Druart 2022-11-04 12:38:22 UTC
Created attachment 143183 [details] [review]
Bug 31261: Introduce flatpickr-futureinclusive

That let us use future + today, and it's working perfectly for our use
case :)

Sponsored-by: Association KohaLa - https://koha-fr.org/
Comment 7 David Nind 2022-11-04 12:51:00 UTC
Created attachment 143201 [details] [review]
Bug 31261: Disable dates in the past for curbside pickups

When creating a new pickup the dates in the past won't display any
available slots. It would be better to disable them in the date picker.

Test plan:
Setup curbside pickups for your library (see bug 30650 test plan if
needed)
Create a new pickup (staff and OPAC) and confirm that the date picker widget
has the dates in the past disabled.

QA note: More work would be needed to sync calendar.inc code between
OPAC and staff. Also note that the "clear date" code wasn't needed
(please confirm).

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-11-04 12:51:05 UTC
Created attachment 143203 [details] [review]
Bug 31261: Introduce flatpickr-futureinclusive

That let us use future + today, and it's working perfectly for our use
case :)

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2022-11-13 13:11:01 UTC
Created attachment 143804 [details] [review]
Bug 31261: Disable dates in the past for curbside pickups

When creating a new pickup the dates in the past won't display any
available slots. It would be better to disable them in the date picker.

Test plan:
Setup curbside pickups for your library (see bug 30650 test plan if
needed)
Create a new pickup (staff and OPAC) and confirm that the date picker widget
has the dates in the past disabled.

QA note: More work would be needed to sync calendar.inc code between
OPAC and staff. Also note that the "clear date" code wasn't needed
(please confirm).

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2022-11-13 13:11:06 UTC
Created attachment 143805 [details] [review]
Bug 31261: Introduce flatpickr-futureinclusive

That let us use future + today, and it's working perfectly for our use
case :)

Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2022-11-13 13:11:54 UTC
Really helpful enh bordering on a bug fix (scheduling something in the past doesn't make sense) :)

Touches templates, but doesn't change strings.
Comment 12 Tomás Cohen Arazi 2022-11-14 12:22:13 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!