Interface tagged VLANs are listed out of order #11769

Closed
opened 2025-12-29 21:49:39 +01:00 by adam · 3 comments
Owner

Originally created by @OliElli on GitHub (Oct 22, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.3.7

Python Version

3.11

Steps to Reproduce

Tag a list of VLANs with both single/double digits (eg "5" and "45") and also a vlan with 3 digits (eg "205")

Expected Behavior

VLANs should be listed in this order:
5, 45, 205

Observed Behavior

The sort seems to only pad to 2 significant digits, so we see this incorrect order:
5, 205, 45

Originally created by @OliElli on GitHub (Oct 22, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.3.7 ### Python Version 3.11 ### Steps to Reproduce Tag a list of VLANs with both single/double digits (eg "5" and "45") and also a vlan with 3 digits (eg "205") ### Expected Behavior VLANs should be listed in this order: 5, 45, 205 ### Observed Behavior The sort seems to only pad to 2 significant digits, so we see this incorrect order: 5, 205, 45
adam added the type: bugnetbox labels 2025-12-29 21:49:39 +01:00
adam closed this issue 2025-12-29 21:49:39 +01:00
Author
Owner

@OliElli commented on GitHub (Oct 22, 2025):

The ordering is also wrong in the same way in a graphQL query (How I found it)

Query example:

query MyQuery 
{ device_list(filters: {status: STATUS_ACTIVE, name: {exact: "fra4-sw-05a"}}}) {
name interfaces(filters: {name: {exact: "ae4"}}) {name tagged_vlans {vid}}}}
@OliElli commented on GitHub (Oct 22, 2025): The ordering is also wrong in the same way in a graphQL query (How I found it) Query example: ``` query MyQuery { device_list(filters: {status: STATUS_ACTIVE, name: {exact: "fra4-sw-05a"}}}) { name interfaces(filters: {name: {exact: "ae4"}}) {name tagged_vlans {vid}}}} ```
Author
Owner

@arthanson commented on GitHub (Oct 23, 2025):

@OliElli can you please expand the description, what page are you looking at where you are seeing them out of order (screenshot if possible showing the issue), also a step-by-step of what you are creating when you say "Tag a list of VLANs". VLAN IDs are not unique and the list view doesn't show them in order, but you can sort them by the VID if needed.

@arthanson commented on GitHub (Oct 23, 2025): @OliElli can you please expand the description, what page are you looking at where you are seeing them out of order (screenshot if possible showing the issue), also a step-by-step of what you are creating when you say "Tag a list of VLANs". VLAN IDs are not unique and the list view doesn't show them in order, but you can sort them by the VID if needed.
Author
Owner

@OliElli commented on GitHub (Oct 28, 2025):

Looks like this was a subtle issue with my own VLANs! Most but not all were assigned to both VLAN Group and Sites. When I remove the site assignment in favour of VLAN Groups (per the recent deprecation announcement) it resolves the ordering.

@OliElli commented on GitHub (Oct 28, 2025): Looks like this was a subtle issue with my own VLANs! Most but not all were assigned to both VLAN Group and Sites. When I remove the site assignment in favour of VLAN Groups (per the recent deprecation announcement) it resolves the ordering.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11769