Skip to content

Add the ability to sort iterations by due date DESC

euko requested to merge 372767-sort-iterations-by-due-date-api into master

What does this MR do and why?

  1. Adds the ability to sort iterations by cadence and due dates (DESC)
  • Adds a new model scope
  • Modifies the finder
  • Adds a new GraphQL enum for iterations sort
  1. Refactors an existing scope !98952 (comment 1116918442)

How to set up and validate locally

For the added scope, a typical GraphQL query we might use is:

{
  group(fullPath: "gitlab-org") {
    iterations(
      iterationCadenceIds: ["gid://gitlab/Iterations::Cadence/16671"]
      state: closed
      sort: CADENCE_AND_DUE_DATE_DESC
      first: 20
    ) {
      nodes {
        id
        dueDate
        state
      }
    }
  }
}

It's corresponding DB query and its plan are: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/12295/commands/43658

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

Edited by euko

Merge request reports

Loading