API should tell if an issue was moved

Problem to solve

Currently, there is no way to tell via the API if an issue was moved to somewhere else. It is simply marked as state: 'closed'. This poses a problem in these cases:

  • One wants to find out if the issue is still alive, maybe to find out its current state, to update notifications, etc.
  • For post-hoc analysis of time spent (I don't want to double count times which were spent on the same issue, but in several projects) or of the velocity (I don't want to double count story points given to the old and the new issue).

Intended users

  • API users in general, developers of plugins or standalone scripts.

Specifically:

  • Delaney (Development Team Lead)
  • Devon (DevOps Engineer)
  • Dana (Data Analyst)

Further details

I'd like to see the API deliver everything my GitLab instance knows. If there's a feature in GitLab's web interface it would be great to expose that to the API users as well.

Proposal

Something like this in the response to a GET issue request:

{
  ...
  "moved": "https://gitlab.com/...",
  ...
}

Permissions and Security

Same as for the rest of the API.

Documentation

Add the field to the issue API documentation.

Testing

  • Test for unmoved issues.
  • Test for moved issues.

What does success look like, and how can we measure that?

curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues/41 | grep "moved" && echo OK || echo FAIL

What is the type of buyer?

API users who by their apps increase the value of GitLab.

Links / references

None.

Assignee Loading
Time tracking Loading