Issues REST API does not find issues by iid if they are tasks
What does this MR do and why?
Filters out issues of type task
in the REST API when fetched by iid. API returns a 404 if the found issue is of type task.
How to set up and validate locally
- Make sure you can fetch an issue via the rest API using a command like
curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues/<iid>"
- Find the same issue on the Rails console and change the
issue_type
to taskissue.update!(issue_type: :task)
- Make the same request
curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues/<iid>"
- This time you should get a 404 http status code
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #366197 (closed)
Edited by Mario Celi