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

Closed
opened 2025-12-29 21:20:11 +01:00 by adam · 2 comments
Owner

Originally created by @diondohmen on GitHub (May 10, 2024).

Originally assigned to: @arthanson on GitHub.

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

Originally created by @diondohmen on GitHub (May 10, 2024). Originally assigned to: @arthanson on GitHub. ### 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](https://github.com/netbox-community/netbox/assets/60485478/d1f5c01b-183d-4047-a5d4-29f0fbccfe81) ![afbeelding](https://github.com/netbox-community/netbox/assets/60485478/b2a481f6-bb78-453a-8fde-c4aa1881660d) 3. 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](https://github.com/netbox-community/netbox/files/15271733/public_dev_netbox_devices_import_ttt.csv) ![afbeelding](https://github.com/netbox-community/netbox/assets/60485478/75a3a11c-6221-441a-895f-a4644292f7d6) 5. After submitting you can see the device has been added but the custom field '_test_default_' is empty. ![afbeelding](https://github.com/netbox-community/netbox/assets/60485478/66052d7c-50aa-4ae5-8d98-cf1ce5c112c4) ### Expected Behavior The custom field's value should be 'True' like in the following screen: ![afbeelding](https://github.com/netbox-community/netbox/assets/60485478/3241ef57-73bf-4b7c-b809-485ca86ae104) ### 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
adam added the type: bugstatus: acceptedcomplexity: medium labels 2025-12-29 21:20:11 +01:00
adam closed this issue 2025-12-29 21:20:11 +01:00
Author
Owner

@arthanson commented on GitHub (Jun 13, 2024):

@abhi1693 are you still planning to work on this?

@arthanson commented on GitHub (Jun 13, 2024): @abhi1693 are you still planning to work on this?
Author
Owner

@abhi1693 commented on GitHub (Jun 13, 2024):

Sorry, won't be able to work on this

@abhi1693 commented on GitHub (Jun 13, 2024): Sorry, won't be able to work on this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9642