Add STATUS_ASC and STATUS_DESC to IssueSort enum

What does this MR do and why?

This MR adds STATUS_ASC and STATUS_DESC sorting options to the IssueSort enum.

Once the MR with the sorting logic (!199860 (merged)) is merged, these options will enable sorting of dashboard issues that span multiple namespaces by status, in either ascending or descending order.

For now, if STATUS_ASC or STATUS_DESC is provided in a GraphQL query, the results are returned as-is, without sorting applied.

Notes

To sort work items by status, we will use the workItems API. The required sorting options have already been exposed in the WorkItemSort enum (see !201401 (merged)).

References

How to set up and validate locally

  1. Run the following queries to test the STATUS_ASC and STATUS_DESC sorting options. Since the sorting functionality hasn't been merged yet, the results are returned as-is, without any sorting applied.
query {
  issues(authorUsername: "root", sort: STATUS_ASC) {
    nodes {
      id
      title
      status {
        id
        name
        category
      }
    }
  }
}
query {
  issues(authorUsername: "root", sort: STATUS_DESC) {
    nodes {
      id
      title
      status {
        id
        name
        category
      }
    }
  }
}

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Agnes Slota

Merge request reports

Loading