API: `merged_at` values missing for certain Merge Requests in `merged` state
Summary
In gitlab-insights
and future features we rely on the merged_at
timestamp being available for Merge Requests in the merged
state. Under certain circumstances this field isn't available for merged MRs when indexing MRs and retrieving and individual MR via the API.
This definitely does not affect all MRs, but I could not notice a pattern between those affected
Steps to reproduce
- Query
api/v4/projects/:project_id/merge_requests
- Notice some MRs do not have
merged_at
data available
Example Project
The following merged MR is an example that exhibits the problem:
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24137
- https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/merge_requests/24137
What is the current bug behavior?
-
merged_at
field isnull
What is the expected correct behavior?
-
merged_at
field should be populated with the relevant timestamp
Relevant logs and/or screenshots
N/A
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
gitlab-ce~3293941 v11.8.0-rc9
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Edited by Dan Jensen