Skip to content

User can sort and filter issues by health status

What does this MR do and why?

Split filtering into 👉 !95580 (merged)

Adds the ability to do the following to a collection of issues:

  • filter by health_status including negated
  • sort by health_status, ascending or descending.

How to set up and validate locally

  1. create some issues in a project
  2. In GraphiQL, use the query
query {
	project(fullPath: "group/project_path") 
  {
    issues(healthStatus: ANY, sort: HEALTH_STATUS_ASC, first: 5) {
      nodes {
        title
        healthStatus
      }
    }
  }

You should get something like

{
  "data": {
    "project": {
      "issues": {
        "nodes": [
          {
            "title": "Top Banner with user information",
            "healthStatus": "onTrack"
          },
          {
            "title": "User sign up page view",
            "healthStatus": "needsAttention"
          },
          {
            "title": "User login page view",
            "healthStatus": "atRisk"
          }}}}}}

Negation also works:

query {
	project(fullPath: "group/project_path") 
  {
issues(not: { healthStatus: AT_RISK }, sort: HEALTH_STATUS_ASC, first: 5) {
      nodes {
        title
        healthStatus
      }
    }
  }

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 #218711 (closed)

Edited by charlie ablett

Merge request reports