Searching users by the admin panel wipes query when using sort
Summary
Users in the admin panel cannot be searched by a query and sorted at the same time.
Editing the URL manually works.
Steps to reproduce
https://gitlab.com/admin/users
Go to the admin panel as an admin, search for something, for example "log", then use the sort dropdown menu and sort by something, for example "Oldest sign in".
What is the current bug behavior?
Your search query will be wiped and users will only be sorted through the "Oldest sign in"
What is the expected correct behavior?
Search query remains and users are also sorted by "Oldest sign in".
Results of GitLab environment info
System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknown
GitLab information Version: 10.0.4-ee Revision: 047fcee2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.3 URL: HTTP Clone URL: SSH Clone URL: Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.9.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 5.9.0 ? ... OK (5.9.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ...
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... no Try fixing it: Check that the information in config/gitlab.yml is correct For more information see: doc/administration/reply_by_email.md Please fix the error above and rerun the checks. Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ...
Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1508494447 sudo mv /var/opt/gitlab/.ssh/authorized_keys.lock ~/gitlab-check-backup-1508494447 sudo mv /var/opt/gitlab/.ssh/id_rsa.pub ~/gitlab-check-backup-1508494447 sudo mv /var/opt/gitlab/.ssh/id_rsa ~/gitlab-check-backup-1508494447 For more information see: doc/ssh/README.md in section "SSH on the GitLab server" Please fix the error above and rerun the checks. Active users: ... 65 Elasticsearch version 5.1 - 5.5? ... yes (5.1.2)
Checking GitLab ... Finished
Possible fixes
You can work around the issue by manually editing the query to look like this
https://gitlab.com/admin/users?utf8=%E2%9C%93&search_query=log&sort=oldest_sign_in