Skip to content

Admin Users not sorted by "name" as highlighted

Summary

Accessing the users section in the admin area lists users accounts unsorted even sort by "Name" is the highlighted as the active sort method.

https://gitlab.zendesk.com/agent/tickets/86226

Steps to reproduce

Access admin>users

What is the current bug behavior?

Highlighted active sort method is not reflected in the users list.

What is the expected correct behavior?

Users list should be sorted according to the highlighted method on initial page load.

Possible fixes

  • Load a user list that is already sorted by name as name is the default selected sorting method.

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/admin/users/index.html.haml#L76

  • It seems like @users is already set to a list sorted by 'name' but it's not having the desired effect.

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/admin/users_controller.rb#L5

  • Grey out "name" in the sorting list to indicate that it's not active

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/admin/users/index.html.haml#L76

Edited by Chenjerai Katanda