Skip to content

Fix Error 500 when using closes_issues API with an external issue tracker

Stan Hu requested to merge stanhu/gitlab-ce:fix-closes-issues-error-500 into master

What does this MR do?

The MR fixes an Error 500 when a user issues an API request with the closes_issues API (e.g. https://gitlab.example.com/api/v3/projects/XXX/merge_requests/YYY/closes_issues).

Are there points in the code the reviewer needs to double check?

The /issues API endpoint doesn't actually support external issues, so I left those untouched.

Why was this MR needed?

Error 500s would result because missing fields in ProjectEntity:

NoMethodError (API::Entities::Issue missing attribute `description' on ABC-XXXX): 

What are the relevant issue numbers?

#18484 (closed)

Merge request reports