Skip to content

Do not return task type issues on the REST API

Mario Celi requested to merge 366197-hide-tasks-rest-api into master

What does this MR do and why?

Removes tasks from issues lists and also statistics calculations on the issues REST API.

The spec seems simple but creating a task in the DB breaks 38 existing specs on that file without filtering out tasks.

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"
  2. Find one of the returned issues 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"
  4. This time you should not get the updated issue on the response, it should be excluded.

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