Skip to content

Export and Import Custom Fields #7772

Closed
@dmetzler1988

Description

@dmetzler1988

NetBox version

v3.0.9

Python version

3.9

Steps to Reproduce

  1. Create new custom fields with choices (no one exists previously)
  2. Export these custom fields via button Export -> All data
  3. Remove the created custom fields
  4. Import this exported CSV via CSV File Upload
    4.1 An error would occur, that the ID in the first line is not expected.
  5. Open the exported CSV in a text-editor, remove ID in header and on the lines
    5.1 Modify title names to these which are given/listed on import page (all to lowercase, replace spaces with underscore)
    # from
    ID,Name,Content types,Label,Type,Required,Weight,Default,Description,Filter logic,Choices
    # to
    name,content_types,label,type,required,weight,default,description,filter_logic,choices
    
  6. Import this via CSV Data input field and click on Submit

Expected Behavior

The Custom fields will be imported without an error - in an optimal world without a need to modify the exported data.

Observed Behavior

On step 4 this error occurs (as a red popup):

Unexpected column header "ID" found.

If we only remove the ID in header and body, this error occurs at next (as a red popup)

Unexpected column header "Name" found.

And so on for each header column name from export.


On step 6 this error occurs via new Server Errorpage:

<class 'ValueError'>

not enough values to unpack (expected 2, got 1)

Python version: 3.9.5
NetBox version: 3.0.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: 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