Feature Unit/System Tests PR-6.3-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
3 Oct 2026

Pull Request resolves #47412 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

When creating a new user in the admin the selected User Group filter is now used as the default User Group for the new user.

Previously, clicking New always used the globally configured default user group (new_usertype), even when the Users list had been filtered to a specific user group.

This change is consistent with the behaviour that we have throughout the ui

Testing Instructions

Go to the admin list of users
Filter by group eg manager
Click New to create a New User

Actual result BEFORE applying this Pull Request

The new user will always be in the registered group by default (or whatever group is defined in the component options as the default group)

Expected result AFTER applying this Pull Request

The new user will be in the filtered group eg manager by default

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 3 Oct 2026
avatar brianteeman brianteeman - change - 3 Oct 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2026
Category ⇒ Administration com_users JavaScript Unit Tests
avatar brianteeman
brianteeman - comment - 3 Oct 2026

The failing test appears to be unrelated to any changes in this PR

 AssertionError: Timed out retrying after 4000ms: Expected to find content: 'Password Reset Required' but never did.
avatar brianteeman brianteeman - change - 4 Oct 2026
Labels Added: Feature Unit/System Tests PR-6.3-dev
avatar brianteeman
brianteeman - comment - 4 Oct 2026

updating branch to re-trigger tests

avatar brianteeman
brianteeman - comment - 4 Oct 2026

grrh same test still failing but definitely nothing to do with this pr

avatar brianteeman
brianteeman - comment - 4 Oct 2026

grrh same test still failing but definitely nothing to do with this pr

avatar brianteeman
brianteeman - comment - 5 Oct 2026

I found the problem with the test (I wasnt resetting the filter afterwards) and fixed it

avatar BrainforgeUK
BrainforgeUK - comment - 7 Oct 2026

Tested ok.

avatar tecpromotion tecpromotion - test_item - 16 Oct 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 16 Oct 2026

I have tested this item ✅ successfully on 37d756e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar tecpromotion
tecpromotion - comment - 16 Oct 2026

I have tested this item ✅ successfully on 37d756e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar tecpromotion
tecpromotion - comment - 16 Oct 2026

I have tested this item ✅ successfully on 37d756e


Filter the Users list by a group, click New: that group is pre-selected. Without a filter the default group (Registered) is used as before.

Verification

6.3-dev + PR, fresh install, PHP in DDEV.

Case Result
Super User, filter Manager → New Manager checked ✅
Save with that group user saved in Manager ✅
No filter → New Registered (default) ✅
Filter Manager → New → Cancel → New without filter Registered, nothing leaks ✅
Filter Manager → New → Save & New Registered (filter not applied)
Filter Manager → menu Users → Add New User Registered (filter not applied)
Administrator (not Super User), filter Super Users → New no group checked (Super Users box is hidden for them); save → "You can't save a user account without selecting at least one user group." Before the PR: Registered

Other form defaults are identical with and without the filter. The new Cypress test passes locally (User.cy.js 4/4), CI is green.

Suggestion

Elsewhere in core the list filter is applied in the model for new items (ArticleModel, BannerModel, FieldModel, ItemModel::loadFormData() read <list>.filter from the user state). Doing the same here would also cover Save & New and the Add New User menu link, and would fall back to the default group when the filtered group can't be assigned by the current user. Tested locally with the controller override removed: New, Save & New and the menu link pre-select Manager; no filter → Registered; Administrator + Super Users filter → Registered; User.cy.js 4/4.

Note the context: UsersModel appends the layout, so the key is com_users.users.default.filter.

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar exlemor exlemor - test_item - 27 Oct 2026 - Tested successfully
avatar exlemor
exlemor - comment - 27 Oct 2026

I have tested this item ✅ successfully on 37d756e

I was able to successfully test this PR fix. Thanks @brianteeman.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar exlemor
exlemor - comment - 27 Oct 2026

I have tested this item ✅ successfully on 37d756e

I was able to successfully test this PR fix. Thanks @brianteeman.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar richard67 richard67 - change - 27 Oct 2026
Status Pending ⇒ Ready to Commit
avatar richard67
richard67 - comment - 27 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar richard67
richard67 - comment - 27 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar TLWebdesign
TLWebdesign - comment - 11 Nov 2026

@brianteeman could you respond to the suggestion made by @tecpromotion? If i read it correctly his suggestion would be an improvement to the current PR?

avatar brianteeman
brianteeman - comment - 11 Nov 2026

He marked it as a successful test so I didn't read the rest

avatar brianteeman
brianteeman - comment - 11 Nov 2026

Sorry @tecpromotion I didnt see the suggestion. You're right, this would be a better approach.

Putting this in the model's loadFormData() means we handle all the different ways of opening a new user form, including Save & New and the Add New User menu link, rather than just the toolbar New button.

It also gives us the opportunity to fall back to the configured default group when the selected filter group cannot be assigned by the current user.

I'll revisit the implementation and move this out of the controller and into the model. Thanks for testing the additional scenarios and identifying the improvements.

avatar brianteeman
brianteeman - comment - 11 Nov 2026

Please remove RTC until I can rework this

avatar richard67 richard67 - change - 11 Nov 2026
Status Ready to Commit ⇒ Pending
avatar richard67
richard67 - comment - 11 Nov 2026

Back to pending as the PR will receive changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

avatar exlemor exlemor - test_item - 13 Nov 2026 - Tested successfully
avatar exlemor
exlemor - comment - 13 Nov 2026

I have tested this item ✅ successfully on 37d756e

Re-tested this updated PR, @brianteeman, thank you! :)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48557.

Add a Comment

Login with GitHub to post a comment