Skip to content

Custom Field Choice Set: Duplicate values result in missing options in Selection field UI #21063

@Mister-MAP

Description

@Mister-MAP

NetBox Edition

NetBox Community

NetBox Version

v4.4.8

Python Version

3.12

Steps to Reproduce

  1. Go to Customization > Custom Field Choices.
  2. Create a new Choice Set (e.g., "Region").
  3. In the Extra Choices add the following entries with duplicate values:
    dc1:Asia
    dc1:Europe
    dc2:America
  4. Save the Custom Field Choice Set (System accepts this without error).
  5. Go to Customization > Custom Fields.
  6. Create a new field:
  • Name: "Region"
  • Type: Selection
  • Choice Set: "Region"
Image Image
  • Object Types: IPAM > VLAN (or any other object)
  1. Navigate to IPAM > VLANs and click Add.
  2. 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

  1. The Choice Set is saved successfully with duplicate values.
  2. In the VLAN creation form, the dropdown list shows:
  • Asia (value: dc1)
  • America (value: dc2)
  1. 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 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