It looks like one must enter a time in the format 00:00 or you will be unable to save the task. The page reloads with the message "Failed to add scheduled task" and no other information about why it failed.
Just tried this out and I can confirm it. Few different things could be done here. 1. Placeholder in the input to show 00:00 2. Error handling that retain submitted values and show a hint about the validation failure 3. Do client-side validation
Hi Owen and David, I built a test plan for this reported error state: Schedule report - enter no time value - operations test 1 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter no value in the 'time' field 8. press 'save'. Result - fail: - as stated in ticket the form submission created an error state producing notification 'Failed to add scheduled task' - no scheduled report action is set Schedule report - enter simple int only time value - operations test 2 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter '000' in 'time' field 8. press 'save'. Result - pass: - The form submission does not create an error state or produce a notification - report is scheduled for midnight Following on from David's suggestions, I suggest we add the following as a hotfix until a larger review of the form on this page can be done. - Add a 'required' attribute to time input field, which will natively block form submit if no value is present in this field. - Add a place holder attribute for the time input field to assist users in best time format approach - Update label string for time input field 'Time (time in 24 hours e.g 00:00' to further inform user of the format needed. e.g from.. <li><label for="starttime">Time:</label> <input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5"></li> to... <li> <label for="starttime">Time (time in 24 hours e.g 00:00:</label> <input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" placeholder="hh:mm" required> </li> This would create a nice 'hot fix' for the form, to mitigate user confusion on best time format. The larger review of the task scheduler form could the be done to incorporate flat picker etc. If this works for everyone, I will assign this bug to myself and put a quick patch together for testing. Let me know. Thanks.
opps typo in test 2... here we go again... Hi Owen and David, I built a test plan for this reported error state: Schedule report - enter no time value - operations test 1 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter no value in the 'time' field 8. press 'save'. Result - fail: - as stated in ticket the form submission created an error state producing notification 'Failed to add scheduled task' - no scheduled report action is set Schedule report - enter simple int only time value - operations test 2 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter '0000' in 'time' field 8. press 'save'. Result - pass: - The form submission does not create an error state or produce a notification - report is scheduled for midnight Following on from David's suggestions, I suggest we add the following as a hotfix until a larger review of the form on this page can be done. - Add a 'required' attribute to time input field, which will natively block form submit if no value is present in this field. - Add a place holder attribute for the time input field to assist users in best time format approach - Update label string for time input field 'Time (time in 24 hours e.g 00:00' to further inform user of the format needed. e.g from.. <li><label for="starttime">Time:</label> <input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5"></li> to... <li> <label for="starttime">Time (time in 24 hours e.g 00:00:</label> <input type="text" name="starttime" id="starttime" value="" maxlength="5" size="5" placeholder="hh:mm" required> </li> This would create a nice 'hot fix' for the form, to mitigate user confusion on best time format. The larger review of the task scheduler form could the be done to incorporate flat picker etc. If this works for everyone, I will assign this bug to myself and put a quick patch together for testing. Let me know. Thanks.
Hi All, I will write the MVP patch for this. Thanks.
Created attachment 189897 [details] [review] Bug 37402: Applying scheduler form UI changes to ensure correct form state fail and also adding form place holder and label update to better inform users
Bug 37402: Task scheduling fails if you don't use the correct time format Applying scheduler form UI changes to ensure correct form state fail and also adding form place holder and label update to better inform users Before patch applied... Schedule report - enter no time value - operations test 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter no value in the 'time' field 8. press 'save'. Result - fail: - Form submission creates an error state producing notification 'Failed to add scheduled task' - Form submission error should relate to the time field requirement and not attempt submit action After patch applied... re-test - Schedule report - enter no time value - operations test 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter no value in the 'time' field 8. press 'save'. Result - PASS: - No 'Failed to add scheduled task' error state occurs, and the correct time require error state does occur - Form does not attempt submit as it identifies the required time field data is missing - Addition time field place holder information is provided and time field label also offer time format information to user Ready for Sign off.
Hi All, work done, patch added. Happy for someone to test. Thanks.
Created attachment 189960 [details] [review] Bug 37402: Applying scheduler form UI changes to ensure correct form state fail Also adding form place holder and label update to better inform users 1. login to koha instance 2. navigate to reports module 3. create a small quick test report or use an existing small test report 4. select 'schedule' from toolbar above main sql window 5. once redirected to task scheduler UI, choose 'tommorow' in drop down 'date' field. 6. enter 'test@local.com' in 'email' field 7. enter no value in the 'time' field 8. press 'save'. Result - PASS: - No 'Failed to add scheduled task' error state occurs, and the correct time require error state does occur - Form does not attempt submit as it identifies the required time field data is missing - Addition time field place holder information is provided and time field label also offer time format information to user Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 189961 [details] [review] Bug 37402: (follow-up) Add standard 'required' attributes and labels This patch also moves time format hint into a standard <div class="hint">. The hour format has been corrected from hhmm to HH:MM. Signed-off-by: Owen Leonard <oleonard@myacpl.org>