Skip to content

Test Cases are seen as issue in the API and there is no way to differentiate them

Summary

Right now, when I fetch all the issues in a project, I get issues and Test Cases. Unfortunately there is no way for me to tell the difference between a Test Case and an issue since there is no field that are returned that flags in anyway that an issue might be a Test Case.

Steps to reproduce

  • Create a project

  • Add issues

  • Add Test cases

  • Call the API to fetch the issues

Issues and Test cases are both returned and Test cases are identified as issue#x and their web_url link to issue. There is no field that is telling you if the issue is really an issue or it is a Test Case instead.

What is the current bug behavior?

There is no way to identify Test cases from normal issues in the API.

If you want to find all Test Cases, you cannot do that

If you want to find all Issues excluding Test Cases, you cannot do that

You will end up modifying Test Cases while thinking you modify issues. You will add a Label, add a comment, set an Epic, a weight to it.

What is the expected correct behavior?

There should be a way to identify Test Cases from issues. A new field returned ? A field like web_url that would point to a different location ?

Output of checks

This bug happens on GitLab.com

Possible fixes

Add a field in the Issue that defines the type (issue or Test case) ?

Change the web_url to point to '-/quality/test_cases/' instead of '/issues/' ?