Reset dropdowns when default is selected
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.
- Enable Feature Flags
echo "Feature.enable(:security_policies_policy_scope) && Feature.enable(:security_policies_policy_scope_project)" | gdk rails c
- Navigate to a group => Settings --> General --> Permissions and group features section
- Enable Security policy scope
- Navigate to Secure --> Policies --> Edit policy project --> Select a project in the group
- Navigate to the newly selected project --> Secure --> Policies --> New Policy --> Result or Execution policy
- Verify the policy scope section appears without the checkbox
- Save the policy
- Navigate back to the project in the group --> Secure --> Policies
- Select the policy you just created and click "Edit policy"
- Unselect the default policy scope and modify the dropdowns
- Verify the yaml updates appropriately
- Check the default scope checkbox
- Verify the yaml for the scope is removed
- Verify the scope dropdowns are reset to the default
- Uncheck the default scope checkbox
- Verify the default yaml is added
Related to #441520 (closed)