joomla-cms
joomla-cms copied to clipboard
Task Scheduler require custom cron execution rules to be filled out
Pull Request for Issue #37313
Summary of Changes
When you create a new scheduled task and select custom execution rules, and you don't specify a execution time, you can't save it now
Testing Instructions
Create Demo Task - Sleep Select Cron Expression Advanced as Execution Rule Do not select all values in area Cron match Try to save, Joomla will show you that you still have empty fields
Actual result BEFORE applying this Pull Request
You were able to click save, but then ran into an error
Expected result AFTER applying this Pull Request
You see that there are required fields left and you cannot save
Documentation Changes Required
None
@MagnusSinger My comment from another, closed PR for the same issue also applies here, see https://github.com/joomla/joomla-cms/pull/37350#issuecomment-1075529830 .
Also the testing instructions should include a test that nothingness broken for other kinds of execution rules that the advanced cron expression .
@richard67 thanks for the hint, I'll have a look at it
See: https://github.com/joomla/joomla-cms/pull/37537#issuecomment-1096275706
@bembelimen @richard67 I tried to control it now via JS, please let me know if this is okay
@dgrammatiko Could you do a quick review on the JS in this PR? To me it looks good, but I am not really a JS expert. Thanks in advance.
@MagnusSinger Could you extend your testing instructions by a test if other execution rules than advanced cron expressions don't require the cron parameters (i.e. mainly a test for your last change)? Thanks in advance. In general it's important that testing instructions don't cover only the test for the fixed issue but also the test that other behaviour of the changed code is not broken.
We need for sure also a server side validation for this (e.g. in the models validate method)
This pull requests has been automatically converted to the PSR-12 coding standard.
This pull request has been automatically rebased to 4.3-dev.
This pull request has been automatically rebased to 4.4-dev.