diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-17 11:13:39 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-17 11:13:39 +0000 |
commit | 80073da95771fc51a4ac05814b0a7ceae1cbdac9 (patch) | |
tree | 09f2dc8652e1913ae84ccbd1add05d837fce5c2a /app/controllers/autocomplete_controller.rb | |
parent | cfcf5460b55c8f6245dd59e4531cd4b3b7abf114 (diff) | |
download | gitlab-ce-80073da95771fc51a4ac05814b0a7ceae1cbdac9.tar.gz |
Include author in assignee dropdown searchassignee-dropdown-autocomplete
When searching for the author in the assignee dropdown it now correctly returns the user
Closes #22905
Diffstat (limited to 'app/controllers/autocomplete_controller.rb')
-rw-r--r-- | app/controllers/autocomplete_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb index daa82336208..fcfa508128e 100644 --- a/app/controllers/autocomplete_controller.rb +++ b/app/controllers/autocomplete_controller.rb @@ -55,7 +55,13 @@ class AutocompleteController < ApplicationController def find_users @users = if @project - @project.team.users + user_ids = @project.team.users.map(&:id) + + if params[:author_id].present? + user_ids << params[:author_id] + end + + User.where(id: user_ids) elsif params[:group_id].present? group = Group.find(params[:group_id]) return render_404 unless can?(current_user, :read_group, group) |