joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Task Scheduler require custom cron execution rules to be filled out

Open magnussinger opened this issue 3 years ago • 8 comments

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 avatar Apr 11 '22 18:04 magnussinger

@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 avatar Apr 11 '22 19:04 richard67

@richard67 thanks for the hint, I'll have a look at it

magnussinger avatar Apr 11 '22 19:04 magnussinger

See: https://github.com/joomla/joomla-cms/pull/37537#issuecomment-1096275706

bembelimen avatar Apr 12 '22 09:04 bembelimen

@bembelimen @richard67 I tried to control it now via JS, please let me know if this is okay

magnussinger avatar Apr 12 '22 19:04 magnussinger

@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.

richard67 avatar Apr 14 '22 12:04 richard67

@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.

richard67 avatar Apr 14 '22 12:04 richard67

We need for sure also a server side validation for this (e.g. in the models validate method)

bembelimen avatar Apr 14 '22 12:04 bembelimen

This pull requests has been automatically converted to the PSR-12 coding standard.

joomla-bot avatar Jun 27 '22 20:06 joomla-bot

This pull request has been automatically rebased to 4.3-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

This pull request has been automatically rebased to 4.4-dev.

HLeithner avatar Sep 30 '23 22:09 HLeithner