Updating Policy Scope may remove unrelated compliance frameworks
Summary
Using the Policy Scope drop-down to add compliance frameworks
Steps to reproduce
- Create a project / group and add a Security Policy
- Make sure there are enough Compliance frameworks that the menu can be scrolled to load more items
- Add a project that would not be loaded by the initially-loaded list
- Update the policy
- Return to update policy again
- Toggle an item above the scroll
- Observe the YAML preview reflects the removal
Example Project
I recorded this issue being reproduced and have attached that as a confidential comment.
What is the current bug behavior?
The policy will be updated with previously-selected items removed
What is the expected correct behavior?
The only items changed should be the items that are deliberately changed.
Results of GitLab environment info
This was reproduced on GitLab.com ( GitLab Enterprise Edition 17.9.0-pre 94243d5e )
Possible fixes
If you can, link to the line of code that might be responsible for the problem.