From a85dde9182f177cc2fdabd90ccdad870bf4d84c3 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 11 Jun 2016 07:16:32 -0700 Subject: Fix Error 500 when using closes_issues API with an external issue tracker Closes #18484 --- lib/api/helpers.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e1d3bbcc02d..de5959e3aae 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -418,5 +418,13 @@ module API def send_git_archive(repository, ref:, format:) header(*Gitlab::Workhorse.send_git_archive(repository, ref: ref, format: format)) end + + def issue_entity(project) + if project.has_external_issue_tracker? + Entities::ExternalIssue + else + Entities::Issue + end + end end end -- cgit v1.2.1