Skip to content

VLANGroup: Single VLAN IDs render as n-n after save #20475

@pheus

Description

@pheus

NetBox Edition

NetBox Community

NetBox Version

v4.4.2

Python Version

3.12

Steps to Reproduce

  1. Go to IPAM → VLAN Groups → Add.
  2. Create a new VLAN group (any name/scope).
  3. In VLAN ID Ranges, enter: 1-5,10,20-30.
  4. Save, view the group (list & detail), then click Edit again.

Expected Behavior

The single VLAN ID 10 remains displayed as 10 (i.e., the value stays 1-5,10,20-30) across:

  • The VLAN groups list/table
  • The group detail view
  • The edit form field

Observed Behavior

After saving, the value is rendered as 1-5,10-10,20-30.
The single VLAN 10 is displayed as a range (10-10) in the list, detail view, and pre‑populated edit form.

Notes

  • VLAN groups support multiple VID ranges; single VLAN IDs are valid inputs. However, the UI expands singletons to n-n when displaying the saved value.
  • Proposal: When serializing VID ranges for display and when pre‑populating the edit form, collapse any range where start == end to a single integer. This keeps the canonical representation user‑friendly without changing storage semantics.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions