No Code Attached Yet
avatar PhilETaylor
PhilETaylor
27 Dec 2021

When I press this button its not running a test - its actually running the actual task.. it should be renamed Run Task

Some scheduled tasks are not going to be scheduled, but manually run - by design - and the way to manually run these is to press the "Run" button... which at the moment says "Run Test" which is factually incorrect.

It should be renamed to "Run Task" and the column header changed too.

Screenshot 2021-12-27 at 23 03 22

avatar PhilETaylor PhilETaylor - open - 27 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 27 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Dec 2021
avatar PhilETaylor
PhilETaylor - comment - 27 Dec 2021

Also if I set the ACL Permission for "Test Task" to "allowed" for public... I can run the task without authentication... probably not what is wanted :)

avatar PhilETaylor
PhilETaylor - comment - 27 Dec 2021

Also if this is a "TEST" button then the next execution date should NOT change ... for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change, and should not be a month from the time I TEST the task..... it should be a month since the last time it was run by schedule.

avatar niharikamahajan02
niharikamahajan02 - comment - 6 Jan 2022

Shall I work on this issue?

avatar ditsuke
ditsuke - comment - 6 Jan 2022

Shall I work on this issue?

Hi, sure go ahead and feel free to ask if you need any help :)

avatar niharikamahajan02
niharikamahajan02 - comment - 7 Jan 2022

Shall I work on this issue?

Hi, sure go ahead and feel free to ask if you need any help :)

Hi, I am a first time contributer in joomla , How do I find where this code is ?

avatar ditsuke
ditsuke - comment - 7 Jan 2022

@niharikamahajan02

Shall I work on this issue?

Hi, sure go ahead and feel free to ask if you need any help :)

Hi, I am a first time contributer in joomla , How do I find where this code is ?

Welcome to the Joomla! community. Often the best way to find the relevant code is to find the component in question. For this issue, that component is com_scheduler, which you can see in the "option" parameter of the URL for this view: http://yoursite.example/administrator/index.php?option=com_scheduler&view=tasks. The other clues are the "view" parameter and the "administrator" in this URL.

You can find the relevant template file (relative to joomla root): administrator/components/com_scheduler/tmpl/tasks/default.php. The View and Model for this page are in the com_scheduler/src directory but you probably won't need them here.

avatar niharikamahajan02
niharikamahajan02 - comment - 8 Jan 2022

Thanks for the information . Please review.

avatar richard67
richard67 - comment - 8 Jan 2022

Closing as having a pull request. Please test #36607 . Thanks in advance.

avatar richard67 richard67 - change - 8 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-08 17:42:02
Closed_By richard67
avatar richard67 richard67 - close - 8 Jan 2022
avatar PhilETaylor
PhilETaylor - comment - 8 Jan 2022

Please reopen.

Three things are required here:

  • Run Test to be renamed Run Task, and the ACL Permission to also be renamed Run Task. #36607 is not complete for that.
  • if I set the ACL Permission for "Test Task" (Run Task) to "allowed" for public... I can run the task without authentication... probably not what is wanted, unless we want the public to be able to run tasks?
  • if this is a "Run Task" button then the next execution date should NOT change ... for example, if I have a task that runs monthly, and half way through the month I click "Run Task" then the next execution date should NOT change, and should not be a month from the time I "Run Task" the task..... it should be a month since the last time it was run by schedule.
avatar richard67 richard67 - change - 8 Jan 2022
Status Closed New
Closed_Date 2022-01-08 17:42:02
Closed_By richard67
avatar richard67 richard67 - reopen - 8 Jan 2022
avatar richard67
richard67 - comment - 8 Jan 2022

Reopening. Thanks for reporting.

avatar niharikamahajan02
niharikamahajan02 - comment - 12 Jan 2022

Please review , I think only one issue part is yet to be solved i.e
Also if this is a "TEST" button then the next execution date should NOT change ... for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change, and should not be a month from the time I TEST the task..... it should be a month since the last time it was run by schedule.

Will you please let me know how to proceed to solve this issue as once the run task button is pressed it runs again from that point of time regardless of the scheduled date.

avatar ditsuke
ditsuke - comment - 18 Jan 2022

Please review , I think only one issue part is yet to be solved i.e Also if this is a "TEST" button then the next execution date should NOT change ... for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change, and should not be a month from the time I TEST the task..... it should be a month since the last time it was run by schedule.

Will you please let me know how to proceed to solve this issue as once the run task button is pressed it runs again from that point of time regardless of the scheduled date.

@niharikamahajan02 I believe we can leave the behavior as-is once it is renamed to just "Run task", however if the alternative behavior is needed it might require some changes in the Task driver class or just the place where $task->run() is being called. It should make for another PR however so you should limit the scope of #36725 to just the language. :)

avatar PhilETaylor
PhilETaylor - comment - 18 Jan 2022

for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change

This is absolutely needed! Any manual runs should have no effect on the scheduling of the next run. There are legitimate reasons for having the ability to be able to ad-hoc run a task.

For example, if a task is to run a backup, you might want to run several manual backups, not effecting the weekly schedule - just an example.

avatar richard67
richard67 - comment - 18 Jan 2022

@PhilETaylor Could you check if PR #36725 and if yes, close the issue here, or if no report back there in the PR what's missing? The author of the PR is a new contributor so he might need some advise in case if something's missing. Thanks in advance.

avatar ditsuke
ditsuke - comment - 18 Jan 2022

for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change

This is absolutely needed! Any manual runs should have no effect on the scheduling of the next run. There are legitimate reasons for having the ability to be able to ad-hoc run a task.

For example, if a task is to run a backup, you might want to run several manual backups, not effecting the weekly schedule - just an example.

Absolutely, I can see the use case now! Once the current PR to rename it gets through I'll work on making this possible.

avatar richard67
richard67 - comment - 18 Jan 2022

Once the current PR to rename it gets through ...

@ditsuke You mean #36725 ? Or is there another one I am not aware of?

avatar ditsuke
ditsuke - comment - 18 Jan 2022

@PhilETaylor Could you check if PR #36725 and if yes, close the issue here, or if no report back there in the PR what's missing? The author of the PR is a new contributor so he might need some advise in case if something's missing. Thanks in advance.

Once the current PR to rename it gets through ...

@ditsuke You mean #36725 ? Or is there another one I am not aware of?

@richard67 the current PR does not take care of:

  • Ensuring manual runs cannot be executed by public users.
  • Modifying manual runs so that they no longer affect the next planned execution of the task.

I believe these should be dealt with in a separate PR.

Edit: yep

avatar richard67
richard67 - comment - 18 Jan 2022

So according to the description of this issue, PR #36725 would solve it. The other aspects came up later in the discussion. So if we shall keep this issue open, title and description should be adjusted so they cover the other issues, too, beside the naming thing.

avatar richard67
richard67 - comment - 18 Jan 2022

For the permission thing ("Ensuring manual runs cannot be executed by public users.") I think there is issue #36677 and PR #36719 , or is that something else?

For the "Modifying manual runs so that they no longer affect the next planned execution of the task." it would need a new issue if we close this here.

avatar ditsuke
ditsuke - comment - 18 Jan 2022

For the permission thing ("Ensuring manual runs cannot be executed by public users.") I think there is issue #36677 and PR #36719 , or is that something else?

The issue/PR do not take care of public permissions yet, but I think we could include them since they're pretty close!

For the "Modifying manual runs so that they no longer affect the next planned execution of the task." it would need a new issue if we close this here.

@PhilETaylor

avatar niharikamahajan02
niharikamahajan02 - comment - 18 Jan 2022

Please review , I think only one issue part is yet to be solved i.e Also if this is a "TEST" button then the next execution date should NOT change ... for example, if I have a task that runs monthly, and half way through the month I click "Test Task" then the next execution date should NOT change, and should not be a month from the time I TEST the task..... it should be a month since the last time it was run by schedule.
Will you please let me know how to proceed to solve this issue as once the run task button is pressed it runs again from that point of time regardless of the scheduled date.

@niharikamahajan02 I believe we can leave the behavior as-is once it is renamed to just "Run task", however if the alternative behavior is needed it might require some changes in the Task driver class or just the place where $task->run() is being called. It should make for another PR however so you should limit the scope of #36725 to just the language. :)

Ok sir!

avatar pritam825
pritam825 - comment - 18 Jan 2022

Can I work on this issue,or it's already solved

avatar niharikamahajan02
niharikamahajan02 - comment - 20 Jan 2022

I have already submitted a PR for this issue .But did not solve Ref: (#36453 (comment)) , so if you want you may resolve this (if no one is working on it). Thanks.

avatar pritam825
pritam825 - comment - 21 Jan 2022

Also if I set the ACL Permission for "Test Task" to "allowed" for public... I can run the task without authentication... probably not what is wanted :)

@PhilETaylor sir, can we create the separate issue for this, because I have solved for the button and column header, so if you are fine with this, then I will open the PR , otherwise not thanks :)

avatar niharikamahajan02
niharikamahajan02 - comment - 21 Jan 2022

I think issue #36677 corresponds to that issue only . As far as button and column header is concerned , PR #36725 would solve it (once it is reviewed).

avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:36:13
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment