Skip to content

For selection type custom fields, allow a single option #10762

@decoupca

Description

@decoupca

NetBox version

v3.3.6

Feature type

Change to existing functionality

Proposed functionality

When creating a selection custom field, allow a single option. Currently, selection type custom fields require at least two available options.

Use case

Some scenarios restrict acceptable value to a few choices (not freeform text), but for which there is, at least currently, only one viable option.

For example, I want to assign a named SNMPv3 credential set to devices which I model as a custom field called snmpv3_ro_cred_name. I want to eliminate any possibility of invalid input, so I prefer a selection field over text. But as we only have one valid SNMPv3 credential set defined, I can't use selection field type, which requires at minimum two available options.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions