asset_tag sometimes not imported when first field in CSV import #7734

Closed
opened 2025-12-29 20:27:37 +01:00 by adam · 3 comments
Owner

Originally created by @duckw on GitHub (Mar 8, 2023).

NetBox version

v3.4.5

Python version

3.9

Steps to Reproduce

On a device import, paste in the following CSV:

asset_tag,serial,device_type,location,manufacturer,device_role,status,site
473565,ABC9876BJ3G,C9200-48P,Row 1,Cisco,Access Switch,inventory,MDF

Delete object and try importing as follows instead:

serial,device_type,location,manufacturer,device_role,status,site,asset_tag
ABC9876BJ3G,C9200-48P,Row 1,Cisco,Access Switch,inventory,MDF,473565

Expected Behavior

Asset tag is reliably imported each time.

Observed Behavior

Asset tag is not imported on the first example, but is correctly imported on second example.

Note: In some instances it does import the asset tag but the examples above have been tested on the demo site.

Originally created by @duckw on GitHub (Mar 8, 2023). ### NetBox version v3.4.5 ### Python version 3.9 ### Steps to Reproduce On a device import, paste in the following CSV: ``` asset_tag,serial,device_type,location,manufacturer,device_role,status,site 473565,ABC9876BJ3G,C9200-48P,Row 1,Cisco,Access Switch,inventory,MDF ``` Delete object and try importing as follows instead: ``` serial,device_type,location,manufacturer,device_role,status,site,asset_tag ABC9876BJ3G,C9200-48P,Row 1,Cisco,Access Switch,inventory,MDF,473565 ``` ### Expected Behavior Asset tag is reliably imported each time. ### Observed Behavior Asset tag is not imported on the first example, but is correctly imported on second example. Note: In some instances it does import the asset tag but the examples above have been tested on the demo site.
adam added the status: duplicate label 2025-12-29 20:27:37 +01:00
adam closed this issue 2025-12-29 20:27:38 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Mar 8, 2023):

Both work just fine for me. I assume you are giving incorrect replication steps (please try your own steps, copy/paste directly from this issue etc.) and your issue is actually a duplicate of this:

https://github.com/netbox-community/netbox/issues/11850

As I cannot replicate this, you will have to update the replication steps.

@kkthxbye-code commented on GitHub (Mar 8, 2023): Both work just fine for me. I assume you are giving incorrect replication steps (please try your own steps, copy/paste directly from this issue etc.) and your issue is actually a duplicate of this: https://github.com/netbox-community/netbox/issues/11850 As I cannot replicate this, you will have to update the replication steps.
Author
Owner

@duckw commented on GitHub (Mar 8, 2023):

You are right that this a duplicate. Saving what I had on the clipboard off, I noticed the UTF-8 BOM was caught in the header from the Excel export.

If #11850 proposes the stripping of such, I'd like to suggest combining with my feature request #11929 to strip whitespace too.

@duckw commented on GitHub (Mar 8, 2023): You are right that this a duplicate. Saving what I had on the clipboard off, I noticed the UTF-8 BOM was caught in the header from the Excel export. If #11850 proposes the stripping of such, I'd like to suggest combining with my feature request #11929 to strip whitespace too.
Author
Owner

@kkthxbye-code commented on GitHub (Mar 8, 2023):

Duplicate of https://github.com/netbox-community/netbox/issues/11850

@kkthxbye-code commented on GitHub (Mar 8, 2023): Duplicate of https://github.com/netbox-community/netbox/issues/11850
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7734