Skip to content

Added tasks back to issues API

Donald Cook requested to merge dc/tasks-issues-api into master

What does this MR do and why?

We removed the ability to fetch work items from the issues API because they were missing a few things that legacy issues had. Now that we are nearing parity with tasks, it makes sense to add it back, which this MR does.

How to set up and validate locally

  1. Get a list of issues in a project on the command line like so:
    curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues"
  2. Create a new task using the API
    curl -X POST --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues?title=test+task&issue_type=task"
    Note the ID of the newly created task
  3. Make the same request
    curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues"
  4. You should see the newly created task first on the list and with the attribute issue_type:task
  5. You can also filter the issue list by the new type
     curl --header "PRIVATE-TOKEN: <token>" "http://localhost:3000/api/v4/projects/<project_id>/issues?issue_type=task"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mario Celi

Merge request reports