Skip to content

Custom field's default value not respected when using bulk import CSV #16073

@diondohmen

Description

@diondohmen

Deployment Type

Self-hosted

NetBox Version

v4.0.1

Python Version

3.12

Steps to Reproduce

P.S.
Tested this also with the current public demo instance of Netbox giving the same result.

  1. Add a new custom field with the following specs:
  • Object-type: DCIM > Device
  • Name: 'test_default'
  • Type: Boolean
  • Required: False
  • Default: true

afbeelding

afbeelding

  1. Use 'Device Bulk Import' feature together with the following CSV file.
    The CSV doesn't mention the cf_test_default column/value so you would expect Netbox to enter the default value

public_dev_netbox_devices_import_ttt.csv

afbeelding

  1. After submitting you can see the device has been added but the custom field 'test_default' is empty.
    afbeelding

Expected Behavior

The custom field's value should be 'True' like in the following screen:
afbeelding

Observed Behavior

The custom field's value is empty/null using the Device Bulk Import.
When adding a device manually, the dropdown box is pre-filled with the correct default value of True

Metadata

Metadata

Assignees

Labels

complexity: mediumRequires a substantial but not unusual amount of effort to implementstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions