Sometimes, I get an error message "Wrong slot selected". I'm hoping someone will understand why this happens. I think it's a bug since the selected slot exists, is displayed and the maximum number of patrons hasn't been reached. Here is my curbside pickup config https://snipboard.io/o6sqi1.jpg I selected 19:40 for today, Monday, Feb 6 https://snipboard.io/r1HdBz.jpg (I did this a bit before 11:30 (screenshot was taken at 11:23:49), if that changes something) The slot has no patrons, and when clicked it becomes green Wrong slot selected https://snipboard.io/w7WzTm.jpg This completely stops the scheduling process. I have to search for the patron again and select another slot to try again. There's no way to know which slot is "wrong" so it's trial and error until I get one that is ok.
I tested Caroline's setup and I get the same message as well: 1. I don't think it is the order of the time slots, as it happened to me for a day when they were in order (Monday) (see bug 32788). 2. I changed Henry's home library to Centerville, but the message still occurred. 3. I couldn't see any errors in the browser console or error logs. 4. I also tried days a week or two in the future, but it still occurred. 5. There are tests (in t/db_dependent/Koha/CurbsidePickups.t) that generate the "Wrong slot selected" message - they seem logical, but shouldn't be something that you can replicate in the staff interface as you can only select from the date and times configured and displayed: #Day is not ok Cannot create a pickup on a day without opening slots defined #Day ok but datetime not ok Cannot create a pickup on a time without opening slots defined #Day ok, datetime inside the opening slot, but wrong (15:15 for instance) Cannot create a pickup on a time that is not matching the start of an interval IRC log discussion links: * 2023-02-03: https://irc.koha-community.org/koha/2023-02-03#i_2470945 * 2023-02-06: https://irc.koha-community.org/koha/2023-02-06#i_2471054
Created attachment 146306 [details] [review] Bug 32891: Fix slot selection in last hour If the curbside pickup module is configured with slot not on the hour (minutes=00), the slots in the last (not complete) hour won't be selectable. Test plan: Create the following configuration: pickup interval: 10 Opening hours: 08:00 to 11:30 Create a pickup and select 11:10 or 11:20 => Without this patch the pickup is not created and the UI displays "Wrong slot selected" => With this patch you are able to create the pickup
Created attachment 146314 [details] [review] Bug 32891: Fix slot selection in last hour If the curbside pickup module is configured with slot not on the hour (minutes=00), the slots in the last (not complete) hour won't be selectable. Test plan: Create the following configuration: pickup interval: 10 Opening hours: 08:00 to 11:30 Create a pickup and select 11:10 or 11:20 => Without this patch the pickup is not created and the UI displays "Wrong slot selected" => With this patch you are able to create the pickup Signed-off-by: David Nind <david@davidnind.com>
Thanks Jonathan for figuring out the cause of the issue!
Created attachment 146332 [details] [review] Bug 32891: Fix slot selection in last hour If the curbside pickup module is configured with slot not on the hour (minutes=00), the slots in the last (not complete) hour won't be selectable. Test plan: Create the following configuration: pickup interval: 10 Opening hours: 08:00 to 11:30 Create a pickup and select 11:10 or 11:20 => Without this patch the pickup is not created and the UI displays "Wrong slot selected" => With this patch you are able to create the pickup Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Thanks Jonathan!
Created attachment 147026 [details] [review] Bug 32891: Fix slot selection in last hour If the curbside pickup module is configured with slot not on the hour (minutes=00), the slots in the last (not complete) hour won't be selectable. Test plan: Create the following configuration: pickup interval: 10 Opening hours: 08:00 to 11:30 Create a pickup and select 11:10 or 11:20 => Without this patch the pickup is not created and the UI displays "Wrong slot selected" => With this patch you are able to create the pickup Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 147027 [details] [review] Bug 32891: (QA follow-up) Fix perlcritic error Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Missing dependencies for 22.05.x, no backport.