Updating Project Scope may remove unrelated items
Summary
Using the Policy Scope drop-down to add except or include Projects to a Security Policy can inadvertently remove projects
Steps to reproduce
- Create a project / group and add a Security Policy
- Make sure there are enough Projects 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
Edited by Duncan