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
Sort subgroups #19348
Comments
Hello @npriebe, thanks for the report. Could you please share more information regarding database you're using? |
Hi @vramik , my Keycloak is running under Docker for now the database is running under a MySQL server. Server type: MySQL |
Thanks @npriebe, could you please elaborate a bit more on the sorting itself? I was digging in a code and found out that top level groups should be sorted by its name: keycloak/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GroupEntity.java Line 38 in e9accaf
while subgroups have no ordering what so ever (unless sorted by ui): keycloak/model/jpa/src/main/java/org/keycloak/models/jpa/entities/GroupEntity.java Line 31 in e9accaf
I got consistent finding with both migrating from 19.0.2 to 21.0.1 and 21.0.1 started from scratch. If the issue is about sorting subgroups, I'll change it to |
Thank you for your efforts @vramik I had tested this again and as it is described in the code, the top groups are sorted cleanly. I had also set up a completely new keycloak from scratch, where these problems did not occur afterwards. So it could really have been a problem with the group UI at the time. It would therefore make sense if the sub-groups were also sorted by name as standard, so that this is consistent with the top groups. |
Thanks @npriebe, I agree it makes sense to sub-groups to be sorted as well. As it's not a regression I'll switch the issue to enhancement. |
We would also like to see sorted subgroups. |
* Review comments to add a test, update the API description and adjust the map storage. Closes #19348 Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
* Review comments to add a test, update the API description and adjust the map storage. Closes keycloak#19348 Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
@vramik In which version will the improvement be available? Could you possibly add a milestone to the issue? |
@npriebe it should be available in 23.0.0. |
* Review comments to add a test, update the API description and adjust the map storage. Closes keycloak#19348 Co-authored-by: Alexander Schwartz <aschwart@redhat.com> (cherry picked from commit dffa7a3)
Before reporting an issue
Area
account/api
Describe the bug
Hi,
I have updated my Keycloak from 19.0.2 to 21.0.1.
Now I have the problem that the groups are not sorted. It doesn't matter whether I create new groups or move existing ones.
However, if I now set up a new Keycloak instance, the sorting works properly when creating and moving groups.
Here an example of my groups:
Version
21.0.1
Expected behavior
Actual behavior
How to Reproduce?
Anything else?
No response
The text was updated successfully, but these errors were encountered: