NPM Resource Changed bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar MagnusSinger
MagnusSinger
11 Apr 2022

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

  1. 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
  2. Change execution rule to something else than Cron Expression Advanced and check if that is still working as before.

Actual result BEFORE applying this Pull Request

  1. You were able to click save, but then ran into an error

Expected result AFTER applying this Pull Request

  1. You see that there are required fields left and you cannot save
  2. Other execution rules than Cron Expression Advanced are still working.

Documentation Changes Required

None

avatar MagnusSinger MagnusSinger - open - 11 Apr 2022
avatar MagnusSinger MagnusSinger - change - 11 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Apr 2022
Category Administration
avatar MagnusSinger MagnusSinger - change - 11 Apr 2022
Labels Added: ?
avatar MagnusSinger MagnusSinger - change - 11 Apr 2022
Title
Require custom task cron execution rules to be filled out
Task Scheduler require custom cron execution rules to be filled out
avatar MagnusSinger MagnusSinger - edited - 11 Apr 2022
avatar richard67
richard67 - comment - 11 Apr 2022

@MagnusSinger My comment from another, closed PR for the same issue also applies here, see #37350 (comment) .

Also the testing instructions should include a test that nothingness broken for other kinds of execution rules that the advanced cron expression .

avatar MagnusSinger
MagnusSinger - comment - 11 Apr 2022

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

avatar bembelimen
bembelimen - comment - 12 Apr 2022
avatar joomla-cms-bot joomla-cms-bot - change - 12 Apr 2022
Category Administration Administration Repository NPM Change JavaScript
avatar MagnusSinger
MagnusSinger - comment - 12 Apr 2022

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

avatar MagnusSinger MagnusSinger - change - 12 Apr 2022
Labels Added: NPM Resource Changed
avatar richard67
richard67 - comment - 14 Apr 2022

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

avatar richard67
richard67 - comment - 14 Apr 2022

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

avatar bembelimen
bembelimen - comment - 14 Apr 2022

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

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

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

avatar HLeithner
HLeithner - comment - 2 May 2023

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

avatar MagnusSinger MagnusSinger - change - 6 May 2023
Labels Added: ? bug
avatar MagnusSinger MagnusSinger - change - 6 May 2023
Labels Added: PR-4.3-dev
avatar HLeithner
HLeithner - comment - 30 Sep 2023

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

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
Task Scheduler require custom cron execution rules to be filled out
[4.4] Task Scheduler require custom cron execution rules to be filled out
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar Jan-at-tetronik
Jan-at-tetronik - comment - 21 Oct 2024

This issue still persists even in version 5.2. The "Cron Expression (Advanced)" option remains virtually unusable that way.

avatar HLeithner HLeithner - change - 15 Nov 2024
Title
[4.4] Task Scheduler require custom cron execution rules to be filled out
[5.2] Task Scheduler require custom cron execution rules to be filled out
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar Hackwar
Hackwar - comment - 16 Jan 2025

@magnussinger Can you please fix the conflicts?

avatar HLeithner
HLeithner - comment - 15 Apr 2025

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

avatar HLeithner HLeithner - change - 15 Apr 2025
Title
[5.2] Task Scheduler require custom cron execution rules to be filled out
[5.3] Task Scheduler require custom cron execution rules to be filled out
avatar HLeithner HLeithner - edited - 15 Apr 2025
avatar HLeithner
HLeithner - comment - 15 Oct 2025

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

avatar richard67 richard67 - change - 17 Oct 2025
Title
[5.3] Task Scheduler require custom cron execution rules to be filled out
[5.4] Task Scheduler require custom cron execution rules to be filled out
avatar richard67 richard67 - edited - 17 Oct 2025
avatar richard67 richard67 - change - 23 Oct 2025
Labels Added: PR-5.4-dev
Removed: ? ? PR-4.3-dev
avatar richard67
richard67 - comment - 23 Oct 2025

I've allowed myself to fix the merge conflict coming from the removal of the es5 scripts in the base branch.

@magnussinger Could you check @n3t 's review comment? Is there something to be changed in this PR?

avatar n3t
n3t - comment - 23 Oct 2025

There is no function Array.contains in Javascript, only Array.includes, therefore instead of
['add', 'remove'].contains(process) should be ['add', 'remove'].includes(process)...

avatar richard67
richard67 - comment - 23 Oct 2025

There is no function Array.contains in Javascript, only Array.includes, therefore instead of ['add', 'remove'].contains(process) should be ['add', 'remove'].includes(process)...

@n3t Thanks. I have fixed that.

avatar richard67 richard67 - change - 23 Oct 2025
The description was changed
avatar richard67 richard67 - edited - 23 Oct 2025
avatar muhme
muhme - comment - 24 Oct 2025

I tried to reproduce the problem, but the error from the issue #37313 was no more seen. If the cron fields are not selected there is a clear error message without this PR:
before_PR

@astridx Could you please try by your own with 5.4?

With this PR there are the individual error messages:
with_PR

If everything works, shall we use standard error handling to standardise the user experience and reduce the code, and close this PR?

avatar richard67
richard67 - comment - 30 Oct 2025

@astridx As the issue #37313 which this PR claims to solve was reported by you: Can you still reproduce the issue on Joomla 5.4? It seems that has been fixed meanwhile so this PR here would not be needed anymore.

Add a Comment

Login with GitHub to post a comment