Skip to content
Snippets Groups Projects
Commit 23f74edf authored by Douwe Maan's avatar Douwe Maan Committed by Robert Speicher
Browse files

Merge branch '3488-fix-service-desk' into 'master'

Resolve "Service Desk filter Error 500"

Closes #3488

See merge request gitlab-org/gitlab-ee!2969
parent b0d96291
No related branches found
No related tags found
1 merge request!2993Prepare 10.0 RC6 EE release
---
title: Fix searching by assignee in the service desk
merge_request: 2969
author:
type: fixed
Loading
Loading
@@ -27,6 +27,12 @@ Merging changes from GitLab CE to EE can result in numerous conflicts.
To reduce conflicts, EE code should be separated in to the `EE` module
as much as possible.
 
When referencing constants *outside* of the `EE` namespace from within it, you
should always use absolute constants - e.g., `::User` instead of `User`. This
will prevent `::EE::User` from being picked instead of `::User`. Follow this
rule even if the constant doesn't exist in the `EE` namespace at present - it
may be added in the future.
### Classes vs. Module Mixins
 
If the feature being developed is not present in any form in CE,
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ module IssuesController
 
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
 
Loading
Loading
Loading
Loading
@@ -227,6 +227,12 @@ def get_service_desk(extra_params = {})
 
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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment