Skip to content

Fix project selection for group project dropdown

Artur Fedorov requested to merge 457156-policies-refactor-group-dropdown into master

What does this MR do and why?

This merge request updates the GroupProjectsDropdown component, used to select projects from a group, in the Security Orchestration application.

The component now preserves the user's selection when performing a search, ensuring that previously selected projects remain selected even after the search results are updated.

These enhancements improve the user experience by making it easier and faster to find and select projects within a group.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description UI
Multiple project selection selection.mov

How to set up and validate locally

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

  1. Go to Group
  2. If you don't have projects, better create 11+. Update ee/app/assets/javascripts/security_orchestration/graphql/queries/get_group_projects.query.graphql first: 10 on line 6, when tested locally, on order to have more then one page for pagination.
  3. Secure -> Policies -> New policy (any type will do)
  4. Go to scope, choose except project option from second dropdown or specific projects from first dropdown
  5. Select 1-2 projects, perform search, make sure selected projects are filtered out, select found projects, make sure all selected projects are in yaml preview on right side
  6. Play around with different selections, and switching between rule mode and yaml mode

Related to #457156 (closed)

Edited by Artur Fedorov

Merge request reports