Skip to content

Issues REST API does not find issues by iid if they are tasks

Mario Celi requested to merge 366197-not-found-on-task-issues-api into master

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

  1. 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>"
  2. Find the same issue on the Rails console and change the issue_type to task
    issue.update!(issue_type: :task)
  3. Make the same request
    curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues/<iid>"
  4. 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.

Related to #366197 (closed)

Edited by Mario Celi

Merge request reports

Loading