Health Status property is case sensitive in Issues REST API
Unlike other properties, the health_status
property is case sensitive for the any
and none
values.
This means it doesn't work with projects like gitlab-triage
, which pass through values to the API with case intact. This led to Condition `health_status: None` brings no results (gitlab-org/ruby/gems/gitlab-triage#326 - closed).
The API should be case agnostic for any
and none
. It's probably OK for it to be case agnostic for at_risk
, needs_attention
, and on_track
as well, and this should make the implementation easier.
How to Reproduce
- See the API Docs: https://docs.gitlab.com/ee/api/issues.html#list-issues
- Start up gdk and try the following query to see that an empty array is returned: http://127.0.0.1:3000/api/v4/projects/flightjs%2FFlight/issues?health_status=any
- Now try it with a uppercase
any
http://127.0.0.1:3000/api/v4/projects/flightjs%2FFlight/issues?health_status=Any - Contrast that with weight: http://127.0.0.1:3000/api/v4/projects/flightjs%2FFlight/issues?weight=Any
Implementation Guide
- A good place to start looking would be https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/ee/api/helpers/issues_helpers.rb#L32
Edited by John Hope