[Bug 37402] New: Task scheduling fails if you don't use the correct time format
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Bug ID: 37402 Summary: Task scheduling fails if you don't use the correct time format Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Task Scheduler Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au Status|NEW |CONFIRMED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Adam Styles <adam.styles@esa.edu.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adam.styles@esa.edu.au Status|CONFIRMED |In Discussion --- Comment #2 from Adam Styles <adam.styles@esa.edu.au> --- 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #3 from Adam Styles <adam.styles@esa.edu.au> --- 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Adam Styles <adam.styles@esa.edu.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |ASSIGNED Assignee|koha-bugs@lists.koha-commun |adam.styles@esa.edu.au |ity.org | --- Comment #4 from Adam Styles <adam.styles@esa.edu.au> --- Hi All, I will write the MVP patch for this. Thanks. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Adam Styles <adam.styles@esa.edu.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33304 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33304 [Bug 33304] Report schedule form time input element attribute type changed to improve valid time value entry -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #5 from Adam Styles <adam.styles@esa.edu.au> --- Created attachment 189897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189897&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #6 from Adam Styles <adam.styles@esa.edu.au> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Adam Styles <adam.styles@esa.edu.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #7 from Adam Styles <adam.styles@esa.edu.au> --- Hi All, work done, patch added. Happy for someone to test. Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189897|0 |1 is obsolete| | --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 189960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189960&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 189961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189961&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189960|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189961|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #10 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192249&action=edit 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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #11 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192250&action=edit 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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #12 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192251&action=edit Bug 37402: (follow-up) Zero pad the hour automatically on blur Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Chloé Zermatten <chloe.zermatten@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 --- Comment #14 from Chloé Zermatten <chloe.zermatten@openfifth.co.uk> --- All pushed to 25.11.x Thanks all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37402 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Pushed to stable |Needs documenting --- Comment #15 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Failed QA in 25.05.x qa failed on koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt with: forbidden pattern: <script> elements must have a "src" or "nonce" attribute I will not be pushing this patch for 25.05.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org