Skip to content

Add sort-by-license to group-level dependencies page

What does this MR do and why?

It adds the capability to order dependencies by license-name to the group-level dependency page.

Note: This is currently behind a feature flag and the backend is not yet ready, so the sorting does not yet work as expected.

Screenshots or screen recordings

Before After
Screenshot_2023-08-29_at_12.54.27_pm Screenshot_2023-08-29_at_12.54.54_pm

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

  1. Enable the feature flag that controls the group-level dependencies app: echo "Feature.enable(:group_level_dependencies)" | rails c
  2. Go to a group and then navigate to Secure -> Dependency list
  3. Verify that the license sort-option is not showing within the sort dropdown
  4. Enable the feature flag that controls the license rendering: echo "Feature.disable(:group_level_licenses)" | rails c
  5. Verify that the license sort-option is now being displayed
  6. Choose the license option and verify the correct network call is going through: dependencies.json?sort_by=license&sort=desc&page=1&filter=all
  7. Change the sort-order to ascending and verify the network call dependencies.json?sort_by=license&sort=asc&page=1&filter=all

Related to #422352 (closed)

Edited by David Pisek

Merge request reports