summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllister Antosik <allisterantosik@allisters-mbp.home>2015-09-15 22:48:24 +0100
committerAllister Antosik <allisterantosik@allisters-mbp.home>2015-09-15 22:48:24 +0100
commitc9389d0e7450850423c8c87062f6c26422b78422 (patch)
treed94d23529605f5fcc1bab3ca56bea59934c84442
parent400b3d26b3867df8910d05bb986f93ac0a3bf206 (diff)
downloadgitlab-ce-c9389d0e7450850423c8c87062f6c26422b78422.tar.gz
Sorted autocomplete users list by name
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/autocomplete_controller.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 007e47f7446..eb4c59d6205 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -48,6 +48,7 @@ v 8.0.0 (unreleased)
- Fix highlighting of deleted lines in diffs.
- Added service API endpoint to retrieve service parameters (Petheő Bence)
- Add FogBugz project import (Jared Szechy)
+ - Sort users autocomplete lists by user (Allister Antosik)
v 7.14.3
- No changes
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb
index 904d26a39f4..202e9da9eee 100644
--- a/app/controllers/autocomplete_controller.rb
+++ b/app/controllers/autocomplete_controller.rb
@@ -32,6 +32,7 @@ class AutocompleteController < ApplicationController
@users ||= User.none
@users = @users.search(params[:search]) if params[:search].present?
@users = @users.active
+ @users = @users.reorder(:name)
@users = @users.page(params[:page]).per(PER_PAGE)
unless params[:search].present?