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.0] Insert new tasks with created_by user on new installations #41581

Merged

Conversation

richard67
Copy link
Member

@richard67 richard67 commented Sep 4, 2023

Pull Request for Issue # .

Summary of Changes

With pull requests #40788 , #40519 and #41326 , an insert statements for new scheduler tasks has been added to files "installation/sql/<dbtype>/extensions.sql".

When I helped to finalize these PRs I decided to do this insert statement without specifying the "created_by" user ID because I was not sure if that would be converted to the real super user ID at the end of the installation.

Now I have checked and know that this would already be the case. See this line here and the method where it's in: https://github.com/joomla/joomla-cms/blob/5.0-dev/installation/src/Model/ConfigurationModel.php#L281 .

This pull request (PR) here adds the "created_by" user ID = 42 to the insert statement like we already do it elsewhere, see e.g. here: https://github.com/joomla/joomla-cms/blob/5.0-dev/installation/sql/mysql/base.sql#L792-L793

We do that because it will not be replaced by the right user ID when the value is zero, see here: https://github.com/joomla/joomla-cms/blob/5.0-dev/installation/src/Model/ConfigurationModel.php#L291 .

Testing Instructions

Code review, or make a new installation and check that the 3 new tasks show the right created by user,

Actual result BEFORE applying this Pull Request

The created_by user ID is zero for the new tasks and will be set to the super user when editing the task.

Expected result AFTER applying this Pull Request

The created by user ID is 42 in the SQL statement, and after the installation the created_by user is the super user used for the installation.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@HLeithner HLeithner merged commit 872e7a8 into joomla:5.0-dev Sep 4, 2023
0 of 2 checks passed
@richard67 richard67 deleted the 5.0-dev-new-tasks-with-created-by-user branch September 4, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants