User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This PR makes several improvements to the code which handles sending update notification:
UsersModel
to allow us to get only users which have Receive System Email parameter set to Yes or No (the current code has to get all users, and filter out the un-wanted users by PHP, an unnecessary extra process).getEmailReceivers
method, uses filter.groups state from UsersModel to get users from all groups at one instead having to loop over every user group like in current code.$notificationModel = \Joomla\CMS\Factory::getApplication()->bootComponent('com_joomlaupdate')
->getMVCFactory()->createModel('Notification', 'Administrator');
$notificationModel->sendNotification('success', '5.3.0' , '5.34.0');
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_joomlaupdate com_users |
Labels |
Added:
PR-5.4-dev
|
@tecpromotion If scenario 4 is the same without and with this PR, then it's a separate issue. Of course it would be nice if it could be fixed by this PR here, too, but possibly @SniperSister can have a look.
@tecpromotion If scenario 4 is the same without and with this PR, then it's a separate issue. Of course it would be nice if it could be fixed by this PR here, too, but possibly @SniperSister can have a look.
Same with and without PR for Scenario 4.
I have tested this item ✅ successfully on 01ad884
See my comments here #46071 (comment)
@tecpromotion It's worth a question if scenario 4 is really valid. When the server is not reachable from the internet, the notification will never be triggered in the regular way.
I have tested this item ✅ successfully on 01ad884
I've tested with different users in different user groups with different admin language settings and different user groups selections in the automated updates options.
Basically I've verified that #46050 still works with this PR here applied.
Status | Pending | ⇒ | Ready to Commit |
RTC
@tecpromotion If scenario 4 is the same without and with this PR, then it's a separate issue. Of course it would be nice if it could be fixed by this PR here, too, but possibly @SniperSister can have a look.
Same with and without PR for Scenario 4.
From my external perspective, scenario 4 is not a use case in practice. I guess you only receive emails through the hack. I believe that if Automatic Updates are disabled, users should not receive emails. It would be great if @joomdonation or @SniperSister could give a definitive answer.
Without enabled automated updates, users shall and will not get emails.
Final test before merge with manual PRs full package installation in public available site:
chmod 555 tmp
Test cases:
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-09-12 10:32:21 |
Closed_By | ⇒ | muhme | |
Labels |
Added:
RTC
|
Thank you @joomdonation for your contribution. Thank you @SniperSister for your support. Thank you @tecpromotion and @richard67 for testing.
Just to make sure I'm testing it correctly.
I have created a few users:
All users have the “Receive system emails” checkbox selected.
Scenario 1
In the first case, I do not have automatic updates enabled.
I insert the code and call up the articles overview for testing.
Result: “Only” the super administrator receives the email.
I think that's the expected behavior.
Scenario 2
Here, I have automatic updates enabled and added all three groups as recipients.
Result: All three users receive the email.
I think that's the expected behavior.
Scenario 3
Here, I have automatic updates enabled and have not explicitly added any groups as recipients.
Result: “Only” the super administrator receives the email.
I think that's the expected behavior.
Scenario 4
Because the site was set up on localhost, I can activate automatic updates, store the groups, and when I save, I get the message: "The automated update service is unavailable for your site as it's not accessible from the internet. Automated updates have been disabled."
Result: the configured group is still saved and the users in the group receive the emails, even though automatic updates are then inactive.
I think that's NOT the expected behavior. Should there still be a check for the status of auto-updates here? I think so.