-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Bug
Copy link
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
NetBox Edition
NetBox Community
NetBox Version
v4.4.8
Python Version
3.12
Steps to Reproduce
- Go to Customization > Custom Field Choices.
- Create a new Choice Set (e.g., "Region").
- In the Extra Choices add the following entries with duplicate values:
dc1:Asia
dc1:Europe
dc2:America - Save the Custom Field Choice Set (System accepts this without error).
- Go to Customization > Custom Fields.
- Create a new field:
- Name: "Region"
- Type: Selection
- Choice Set: "Region"
- Object Types: IPAM > VLAN (or any other object)
- Navigate to IPAM > VLANs and click Add.
- Try to select a value in the newly created custom field (there will be only one entry with dc1 value).
Expected Behavior
Scenario A (Likely intended): NetBox should prevent saving the Choice Set if duplicate values exist, raising a validation error (e.g., "Values must be unique").
Scenario B (Preferable for my case): If duplicate values are permitted, the dropdown UI should display both "Asia" and "Europe" as distinct selectable options.
Observed Behavior
- The Choice Set is saved successfully with duplicate values.
- In the VLAN creation form, the dropdown list shows:
- Asia (value: dc1)
- America (value: dc2)
- The option Europe (value: dc1) is missing from the list.
It seems the UI de-duplicates options based on the value key.
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application