Skip to content

Reset dependency list cursor when changing sorting

What does this MR do and why?

Related #470045 (closed)

Reset dependency list cursor when changing sorting.

When sort order or sort parameter are changed, the cursor is now removed for keyset pagination such that it successfully fetches the correct results.

MR acceptance checklist

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

Screenshots or screen recordings

dependency-list-sorting-cursor

How to set up and validate locally

  1. Enable the rewrite_sbom_occurrences_query feature flag
  2. Import https://gitlab.com/gitlab-examples/security/security-reports project in a group and run the pipeline on master
  3. Visit that group and go to Secure > Dependency list
  4. Click on "Next", other results appear and the cursor query param is updated
  5. Toggle the sort order (by clicking the button next to the "Severity") or the sort parameter (by clicking "Severity" and selecting another param)
  6. Validate that the results refresh and the cursor query param is also removed. Also validate that the network request does not contain the cursor query param.
Edited by Lorenz van Herwaarden

Merge request reports