Do not return task type issues on the REST API
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
- 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"
- Find one of the returned issues 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"
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #366197 (closed)
Edited by Mario Celi