Thanks for getting in touch! I'm sorry you're hitting this unexpected behavior. Changing the scope on variables shouldn't prevent the variable from being displayed. I haven't been able to reproduce this, however I'm not positive I fully understand what you're seeing. Could you provide some more information to ensure I test this accurately?
The user doing this is in the System Adminstrator role.
Version: Octopus 3.15.6
In the attached Paint.Net File .. Turn on each layer in order corresponding to the steps below.
Step 01: Create project - Select Variables
Step 02: Create variable (no Scope) Save
Step 03: No Filtering selected
Step 04: Select Filter Choose DV, Filter
Step 05: Variable Is Displayed
Step 06: Modify variable, select DV for Scope , Save
Step 07: Scope DV is now displayed in the variable List
Step 08: Select Filter Choose DV, Filter
Step 09: Variable Displayed with DV scope on Variable and Filter
Step 10: Modify variable that has the DV scope
Step 11: Remove the scope from Step 10. Apply
Step 12: Variable Displayed with No Scope now display but not Saved. Choose Save
Step 13: Variable Displayed with No Scope
Step 14: Select Filter, Choose DV , Filter
Step 15: Our Filter has applied, but our Variable no longer displays
Thanks for following up with that additional information! I've been able to reproduce this issue where changing the scope of a variable while using the filter is causing the variable to not be displayed. In my case, it's not actually deleting the variables but instead only failing to display them. Can you confirm if the variable still exists after refreshing the variables page without using the filter?
I've tested this in our new UI which is set for release in 4.0, where the issue seems to be resolved with the new variable editor. I appreciate you taking the time to report this, and I'm terribly sorry for the confusion caused by it. I've raised the following issue which you can track here. https://github.com/OctopusDeploy/Issues/issues/3795
Let me know if you have any further questions going forward!
Thanks for confirming that - I'm happy to hear it's not actually deleting the variables in your environment as well. It's just a UI issue which will be resolved in 4.0. Thanks for taking the time to let us know about it, and I'm sorry for the confusion this has caused!
Don't hesitate to reach out if you have any further questions or concerns in the future.