Add sorting projects by full path

What does this MR do and why?

I'm working on this compliance framework project list issue that would benefit tremendously from being sorted by the full path. This is because the user visiting this page is more commonly concerned about groups than projects, but frameworks are added on a per project basis. Currently the list is sorted by ID, which is not at all helpful to the user scanning the list. If the list were sorted by full path, then they could quickly see which projects were in the same group without needing to switch to a nested view where you expand groups to view projects.

References

Related to #477191

Screenshots or screen recordings

Before After
Screenshot_2025-04-10_at_9.25.26_AM Screenshot_2025-04-10_at_10.07.05_AM

How to set up and validate locally

For just testing the sorting query directly

  1. Open up the GraphQL explorer (/-/graphql-explorer)
  2. Run the query:
query getGroupProjects($fullPath: ID!, $sort: NamespaceProjectSort) {
  group(fullPath: $fullPath) {
    id
    projects(first: 20, sort: $sort) {
      nodes {
        id
        name
        fullPath
      }
    }
  }
}

Variables

{
  "fullPath": "your-group-path",
  "sort": "FULL_PATH_ASC"
}

For verifying the compliance dashboard

  1. Go to a group page (e.g. gitlab-org)
  2. In the menu, select Secure > Compliance center
  3. Click the Projects tab on the top of the page
  4. Verify that the table sorts the projects by full path

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 Scott Hampton

Merge request reports

Loading