Commit 21a3d58e authored by Nick Thomas's avatar Nick Thomas

Fix searching by assignee in the service desk

parent 6696fa8f
---
title: Fix searching by assignee in the service desk
merge_request: 2969
author:
type: fixed
......@@ -12,7 +12,7 @@ module EE
def service_desk
if params[:assignee_id].present?
assignee = User.find_by_id(params[:assignee_id])
assignee = ::User.find_by_id(params[:assignee_id])
@users.push(assignee) if assignee
end
......
......@@ -227,6 +227,12 @@ describe Projects::IssuesController do
expect(assigns(:issues)).to contain_exactly(service_desk_issue_2)
end
it 'allows an assignee to be specified by id' do
get_service_desk(assignee_id: other_user.id)
expect(assigns(:users)).to contain_exactly(other_user, support_bot)
end
end
context 'when Service Desk is not available on the project' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment