Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/issue.rb')
-rw-r--r--lib/api/entities/issue.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/api/entities/issue.rb b/lib/api/entities/issue.rb
index 56e942a0383..79adad92d6f 100644
--- a/lib/api/entities/issue.rb
+++ b/lib/api/entities/issue.rb
@@ -55,7 +55,14 @@ module API
end
expose :moved_to_id
- expose :service_desk_reply_to
+ expose :service_desk_reply_to do |issue|
+ issue.present(
+ current_user: options[:current_user],
+ # We need to pass it explicitly to account for the case where `issue`
+ # is a `WorkItem` which doesn't have a presenter yet.
+ presenter_class: IssuePresenter
+ ).service_desk_reply_to
+ end
end
end
end