Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] [4.1 ScheduledTasks]Edits for run task #36725

Open
wants to merge 29 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

niharikamahajan02
Copy link
Contributor

Pull Request for Issue #36453 .

Summary of Changes

Edits for run task.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.1-dev labels Jan 18, 2022
@niharikamahajan02
Copy link
Contributor Author

Please review. Thanks

@tecpromotion
Copy link
Contributor

Please review. Thanks

Please check whether you have taken over all comments from your previous PRs.
Furthermore, I have the impression, but still have to test it, that again not all occurrences have been renamed.
Please also check this with a full text search over the whole repo.
And please keep the code up to date.

@niharikamahajan02
Copy link
Contributor Author

But sir , it is working fine after running the command (npm run build:js )
image

@@ -102,6 +102,14 @@ COM_SCHEDULER_OPTION_ORPHANED_SHOW="Show Orphaned"
COM_SCHEDULER_PERMISSION_TESTRUN="Test task"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COM_SCHEDULER_PERMISSION_TESTRUN="Test task"
COM_SCHEDULER_PERMISSION_RUN_TASK="Run task"

@niharikamahajan02 please check this constant and the string. You have already renamed it in the access.xml.

@tecpromotion
Copy link
Contributor

tecpromotion commented Jan 22, 2022

Should this also be adapted?

$mapping['onAjaxRunSchedulerTest'] = 'runTestCron';

and

public function runTestCron(Event $event)

Perhaps with runTaskCron

@tecpromotion
Copy link
Contributor

And maybe also replace onAjaxRunSchedulerTest with onAjaxRunSchedulerTask?

@ditsuke what do you think about this improvements?

@@ -19,12 +19,12 @@ const initRunner = () => {
const paths = Joomla.getOptions('system.paths');
const token = Joomla.getOptions('com_scheduler.test-task.token');
const uri = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_ajax&format=json&plugin=RunSchedulerTest&group=system&id=%d${token ? `&${token}=1` : ''}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const uri = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_ajax&format=json&plugin=RunSchedulerTest&group=system&id=%d${token ? `&${token}=1` : ''}`;
const uri = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_ajax&format=json&plugin=RunSchedulerTask&group=system&id=%d${token ? `&${token}=1` : ''}`;

@@ -89,7 +89,7 @@ public static function getSubscribedEvents(): array
$mapping['onContentPrepareForm'] = 'enhanceSchedulerConfig';
$mapping['onExtensionBeforeSave'] = 'generateWebcronKey';

$mapping['onAjaxRunSchedulerTest'] = 'runTestCron';
$mapping['onAjaxRunSchedulerTask'] = 'runTaskCron';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onAjaxRunSchedulerTask must also be fixed in the js files.
please check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh yes okk

@tecpromotion
Copy link
Contributor

Please check this two code comments.

* This method is responsible for the "test run" functionality in the Scheduler administrator backend interface.

* already running. This is a fair assumption if this test run was triggered through the administrator backend,

@tecpromotion
Copy link
Contributor

Also, please check the occurrences of 'test-task'.
This concerns file names, function calls and declarations.

@niharikamahajan02 sorry for all the comments but it's best to clean it straight away.

@niharikamahajan02
Copy link
Contributor Author

Also, please check the occurrences of 'test-task'. This concerns file names, function calls and declarations.

@niharikamahajan02 sorry for all the comments but it's best to clean it straight away.

No problem sir 😄 and yes it's better to clean them straight away now

@niharikamahajan02
Copy link
Contributor Author

Yes ,I would rename the file names, function calls and declarations also 👍

@niharikamahajan02
Copy link
Contributor Author

Please suggest if something needs to be updated now . Thanks

@ditsuke
Copy link
Contributor

ditsuke commented Jan 23, 2022

@tecpromotion

@ditsuke what do you think about this improvements?

Thanks for tagging! I really like the changes so far.

@niharikamahajan02
Copy link
Contributor Author

Yes sir , changed the file name now.

@HLeithner
Copy link
Member

I rebased the PR and added back removed language strings and deprecated them.

@Hackwar Hackwar added the Feature label Apr 7, 2023
@laoneo laoneo removed the PR-4.2-dev label Apr 11, 2023
@laoneo laoneo changed the base branch from 4.4-dev to 5.0-dev April 12, 2023 06:20
@laoneo laoneo removed the PR-4.4-dev label Apr 12, 2023
@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:52
@HLeithner
Copy link
Member

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

@hans2103
Copy link
Contributor

@niharikamahajan02 please solve the unresolved conversations of this PR. I would like to see this merged into a following Joomla version, while Run Test is the correct name for the action the button is doing

@niharikamahajan02
Copy link
Contributor Author

please review it once , I think there are some changes to be done

@richard67
Copy link
Member

please review it once , I think there are some changes to be done

@niharikamahajan02 It needs to resolve merge conflicts in files build/media_source/com_scheduler/joomla.asset.json and plugins/system/schedulerunner/schedulerunner.php. Maybe just use the clean files from the 5.1-dev branch and apply your changes again on them.

@niharikamahajan02
Copy link
Contributor Author

but they are already having "run test" in 5.1-dev

@richard67
Copy link
Member

but they are already having "run test" in 5.1-dev

@niharikamahajan02 What do you mean? Drone tests are failing, and if you go to the bottom of this PR on GitHub you clearly see there are the 2 mentioned files which have merge conflicts. If you don't know how to solve them we can help, but maybe you can try it yourself first like I have described.

hans2103 added a commit to hans2103/joomla-cms that referenced this pull request Jan 3, 2024
@HLeithner HLeithner changed the base branch from 5.1-dev to 5.2-dev April 24, 2024 09:09
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [4.1 ScheduledTasks]Edits for run task [5.2] [4.1 ScheduledTasks]Edits for run task Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet