Skip to content

Reset dropdowns when default is selected

Alexander Turinske requested to merge 441520-fix-exclude-projects into master

What does this MR do and why?

Reset dropdowns when default is selected

  • reset dropdown values

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.

Before After
It didn't reset the values policy_scope_bug

How to set up and validate locally

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

  1. Enable Feature Flags
echo "Feature.enable(:security_policies_policy_scope) && Feature.enable(:security_policies_policy_scope_project)" | gdk rails c
  1. Navigate to a group => Settings --> General --> Permissions and group features section
  2. Enable Security policy scope
  3. Navigate to Secure --> Policies --> Edit policy project --> Select a project in the group
  4. Navigate to the newly selected project --> Secure --> Policies --> New Policy --> Result or Execution policy
  5. Verify the policy scope section appears without the checkbox
  6. Save the policy
  7. Navigate back to the project in the group --> Secure --> Policies
  8. Select the policy you just created and click "Edit policy"
  9. Unselect the default policy scope and modify the dropdowns
  10. Verify the yaml updates appropriately
  11. Check the default scope checkbox
  12. Verify the yaml for the scope is removed
  13. Verify the scope dropdowns are reset to the default
  14. Uncheck the default scope checkbox
  15. Verify the default yaml is added

Related to #441520 (closed)

Merge request reports