Filtering VLAN Groups by Site does not show VLAN Groups scoped to Locations within that Site #6802

Closed
opened 2025-12-29 19:45:34 +01:00 by adam · 3 comments
Owner

Originally created by @candlerb on GitHub (Aug 12, 2022).

NetBox version

v3.2.8

Python version

3.8

Steps to Reproduce

  1. Create a site "Campus 1"
  2. Create a location "Campus 1 Building 1" within that site
  3. Create a VLAN group which is scoped to this location (see image)
  4. Go to VLAN groups, Filter tab, and filter by site Campus 1

image

Expected Behavior

I was expecting to find the VLAN group.

That is: when filtering by Site, I would expect to see all VLAN groups which belong to Locations within that Site (since Locations are always children or descendants of a given Site).

Observed Behavior

The VLAN group is not found.

Originally created by @candlerb on GitHub (Aug 12, 2022). ### NetBox version v3.2.8 ### Python version 3.8 ### Steps to Reproduce 1. Create a site "Campus 1" 2. Create a location "Campus 1 Building 1" within that site 3. Create a VLAN group which is scoped to this location (see image) 4. Go to VLAN groups, Filter tab, and filter by site Campus 1 ![image](https://user-images.githubusercontent.com/44789/184342192-cf4fcc81-df48-4176-8470-90fb1fbe510e.png) ### Expected Behavior I was expecting to find the VLAN group. That is: when filtering by Site, I would expect to see all VLAN groups which belong to Locations within that Site (since Locations are always children or descendants of a given Site). ### Observed Behavior The VLAN group is not found.
adam added the type: bugstatus: under review labels 2025-12-29 19:45:34 +01:00
adam closed this issue 2025-12-29 19:45:35 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2022):

The VLAN group isn't included in the results because the filter is matching only on specific assignment to the selected site. A VLAN group can only be assigned to a site or to a location; the "site" field in the form exists solely to assist in selecting a location (just like the region and site group fields).

We could consider a feature request to modify this behavior, but it would be a breaking change (unless we introduce an alternate filter).

@jeremystretch commented on GitHub (Aug 15, 2022): The VLAN group isn't included in the results because the filter is matching only on specific assignment to the selected site. A VLAN group can only be assigned to a site _or_ to a location; the "site" field in the form exists solely to assist in selecting a location (just like the region and site group fields). We could consider a feature request to modify this behavior, but it would be a breaking change (unless we introduce an alternate filter).
Author
Owner

@candlerb commented on GitHub (Aug 15, 2022):

I guess such a FR would also have to consider the other case: when you filter on location X, should you also see items in locations Y and Z which are descendants of location X?

That would apply in other places, even just filtering Devices by Location, and there are use cases for both, so it would need a flag to select which behaviour you want.

@candlerb commented on GitHub (Aug 15, 2022): I guess such a FR would also have to consider the other case: when you filter on _location_ X, should you also see items in locations Y and Z which are descendants of location X? That would apply in other places, even just filtering Devices by Location, and there are use cases for both, so it would need a flag to select which behaviour you want.
Author
Owner

@jeremystretch commented on GitHub (Aug 25, 2022):

I'm going to close this out as not a bug, however if there's still interest we can look at an FR to change the behavior. #10054 might also help with this somewhat.

@jeremystretch commented on GitHub (Aug 25, 2022): I'm going to close this out as not a bug, however if there's still interest we can look at an FR to change the behavior. #10054 might also help with this somewhat.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6802