Bug 32788 - Curbside pickups - Order curbside pickup slots chronologically
Summary: Curbside pickups - Order curbside pickup slots chronologically
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 30650
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-01 20:42 UTC by Caroline Cyr La Rose
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

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


Attachments
Bug 32788: Order curbside pickup slots chronologically (3.29 KB, patch)
2023-02-06 16:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32788: Order curbside pickup slots chronologically (3.35 KB, patch)
2023-02-06 16:51 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 32788: Order curbside pickup slots chronologically (3.42 KB, patch)
2023-02-07 13:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-02-01 20:42:54 UTC
I noticed that if you don't enter the slots in a normal morning-to-evening order, they stay ordered however you entered them. I think they should appear in chronological order based on the hours.

I entered them in random order because I started on Monday 10-12, 13-16, 18-20. When I changed the day to Tuesday, 18-20 was still entered in the boxes so I just clicked Add because I'm lazy and figured I'd save a few keys/click. Then added 10-12 and 13-16. So my Monday was ordered correctly (10-12, 13-16, 18-20) and my Tuesday was ordered 18-20, 10-12, 13-16. I continued with my lazy ways throughout the week, and it's very much out of order lol!

I think if you enter 18-20 and then enter 10-12, the latter should appear before the former (10-12, 18-20).

To reproduce:
1. Enable the CurbsidePickup system preference
2. Go to Administration > Curbside pickup
3. In the Curbside pickup hours, enter for example
   Sunday 13:00 16:00
4. Click Add
5. Add a slot before the previous one, for example
   Sunday 10:00 12:00
6. Click Add
   --> The slots are displayed 13-16, 10-12
Comment 1 Caroline Cyr La Rose 2023-02-03 16:54:31 UTC
I noticed that the order also affects the way the slots are displayed when scheduling a pickup.

If your day looks like 13-16, 10-12 in the configuration, the slots will be in that order too in the Schedule pickup tab in Circulation
Comment 2 Jonathan Druart 2023-02-06 16:06:23 UTC
Created attachment 146285 [details] [review]
Bug 32788: Order curbside pickup slots chronologically

We need to order the slots chronologically, not depending on when they
have been added.

Test plan:
Create a slot 13 to 17 the another one 8 to 12
We want to display 8 to 12 before 13 to 17.
Confirm that this patch fixes that on the 3 following views:
Curbside pickups admin
Curbside pickups staff side
Curbside pickups at the OPAC
Comment 3 Caroline Cyr La Rose 2023-02-06 16:51:17 UTC
Created attachment 146291 [details] [review]
Bug 32788: Order curbside pickup slots chronologically

We need to order the slots chronologically, not depending on when they
have been added.

Test plan:
Create a slot 13 to 17 the another one 8 to 12
We want to display 8 to 12 before 13 to 17.
Confirm that this patch fixes that on the 3 following views:
Curbside pickups admin
Curbside pickups staff side
Curbside pickups at the OPAC

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Caroline Cyr La Rose 2023-02-06 16:51:33 UTC
Thanks Jonathan!
Comment 5 Martin Renvoize (ashimema) 2023-02-07 13:22:45 UTC
Created attachment 146327 [details] [review]
Bug 32788: Order curbside pickup slots chronologically

We need to order the slots chronologically, not depending on when they
have been added.

Test plan:
Create a slot 13 to 17 the another one 8 to 12
We want to display 8 to 12 before 13 to 17.
Confirm that this patch fixes that on the 3 following views:
Curbside pickups admin
Curbside pickups staff side
Curbside pickups at the OPAC

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2023-02-07 13:23:22 UTC
Nice improvement, no regressions found.

PQA
Comment 7 Tomás Cohen Arazi (tcohen) 2023-02-08 12:06:10 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Pedro Amorim 2023-02-09 12:22:40 UTC
Nice work everyone!

Pushed to 22.11.x for next release
Comment 9 Lucas Gass (lukeg) 2023-02-15 21:41:54 UTC
Missing dependencies for 22.05.x, no backport.