The check for truthiness in case calendar.inc accepts time (accepts_time = true) has one flaw: we can't set the time to 00:00. Let's fix it.
Created attachment 170312 [details] [review] Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time To test: 1) Go to circulation.pl (checking out to a patron) 2) Click the settings in the barcode input 3) Set any due date with the time set to 00:00 4) Note that the picker resets the time to 23:59 5) Apply the patch 6) Repeat 1-3 7) Note that the time (00:00) stays put 8) Sign off
Created attachment 170315 [details] [review] Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time To test: 1) Go to circulation.pl (checking out to a patron) 2) Click the settings in the barcode input 3) Set any due date with the time set to 00:00 4) Note that the picker resets the time to 23:59 5) Apply the patch 6) Repeat 1-3 7) Note that the time (00:00) stays put 8) Sign off Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 170430 [details] [review] Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time To test: 1) Go to circulation.pl (checking out to a patron) 2) Click the settings in the barcode input 3) Set any due date with the time set to 00:00 4) Note that the picker resets the time to 23:59 5) Apply the patch 6) Repeat 1-3 7) Note that the time (00:00) stays put 8) Sign off Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The description reads very "developer" :) - I wonder if we should update it to the problem described in the test plan?
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.04
Not sure it's directly related to this but I found an issue in this area: Go to the circ page, open the settings Open the calendar and notice the time part is available Click the red cross to blank the input (bug exists if input is empty or not) Notice the error in the console: Uncaught TypeError: parsedDate is undefined Open the calendar again => The time part is no longer available
I guess the error existed prior to this patch as we were already using parsedDate without testing if it was defined.
Depends on Bug 33703 not in 23.11.x