Skip to content

Editing a Custom Field with Default Value does not pre-populate form with correct value #18557

@mattg66

Description

@mattg66

Deployment Type

NetBox Docker

NetBox Version

v4.2.2

Python Version

3.10

Steps to Reproduce

Create a custom field with a selection type.
Populate the default value with a string such as "Test"
Save the custom field.

Edit the custom field and the Default Value is populated with Test without the quotations, leading to the forms validation failing. Manually adding the quotations to read "Test" allows the form to be submitted

Expected Behavior

The Default Value textarea should be populated with valid JSON

Observed Behavior

The Default Value textarea is not populated with valid JSON leading to the form validation failing.

Metadata

Metadata

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