Bulk update silently ignores mis-spelled header fields #8618

Closed
opened 2025-12-29 20:38:58 +01:00 by adam · 4 comments
Owner

Originally created by @peteeckel on GitHub (Sep 15, 2023).

NetBox version

3.6.1

Python version

3.11

Steps to Reproduce

Try to change the name of some existing items, e.g. inventory items, using a header field that does not exactly match a field name of the corresponding model.

The data I stumbled across this was

id,Name
1,charon xcvr 8
2,charon xcvr 9
3,charon xcvr 10
4,charon xcvr 11
5,charon xcvr 12
6,charon xcvr 15

Note the capitalised Name instead of name.

Expected Behavior

NetBox displays an error message about the field having an incorrect name.

Observed Behavior

The input is accepted, but the data entered is silently ignored.

Originally created by @peteeckel on GitHub (Sep 15, 2023). ### NetBox version 3.6.1 ### Python version 3.11 ### Steps to Reproduce Try to change the name of some existing items, e.g. inventory items, using a header field that does not exactly match a field name of the corresponding model. The data I stumbled across this was ``` id,Name 1,charon xcvr 8 2,charon xcvr 9 3,charon xcvr 10 4,charon xcvr 11 5,charon xcvr 12 6,charon xcvr 15 ``` Note the capitalised `Name` instead of `name`. ### Expected Behavior NetBox displays an error message about the field having an incorrect name. ### Observed Behavior The input is accepted, but the data entered is silently ignored.
adam added the type: bug label 2025-12-29 20:38:58 +01:00
adam closed this issue 2025-12-29 20:38:58 +01:00
Author
Owner

@pv2b commented on GitHub (Sep 15, 2023):

This isn't a bug, it's a feature. This allows a CSV file to be imported into NetBox that might contain extra fields that NetBox might not care about. So maybe this should be an FR?

However, I will agree that maybe it makes sense to make the header name matching case-insensitive at least? That's bitten me a few times.

@pv2b commented on GitHub (Sep 15, 2023): This isn't a bug, it's a feature. This allows a CSV file to be imported into NetBox that might contain extra fields that NetBox might not care about. So maybe this should be an FR? However, I will agree that maybe it makes sense to make the header name matching case-insensitive at least? That's bitten me a few times.
Author
Owner

@peteeckel commented on GitHub (Sep 15, 2023):

I see the advantage of being able to ignore extra fields, but at least the very least there should be a warning or notice (along the lines of "Ignored non model fields Name, ...") about it. Silently ignoring the fields leaves the user in the dark about what happened.

Case insensitivity would also be a good thing, I agree.

@peteeckel commented on GitHub (Sep 15, 2023): I see the advantage of being able to ignore extra fields, but at least the very least there should be a warning or notice (along the lines of "Ignored non model fields Name, ...") about it. Silently ignoring the fields leaves the user in the dark about what happened. Case insensitivity would also be a good thing, I agree.
Author
Owner

@pv2b commented on GitHub (Sep 15, 2023):

In that case, that sounds like it could be the basis for at least two FR's.

  1. Make CSV importer case-insensitive
  2. Add a notification when finding unrecognized fields in an import

And maybe even

  1. Allow the user to confirm/preview the import before actually processing it. (Similar to what scripts can do right now with "dry runs".)
@pv2b commented on GitHub (Sep 15, 2023): In that case, that sounds like it could be the basis for at least two FR's. 1. Make CSV importer case-insensitive 2. Add a notification when finding unrecognized fields in an import And maybe even 3. Allow the user to confirm/preview the import before actually processing it. (Similar to what scripts can do right now with "dry runs".)
Author
Owner

@peteeckel commented on GitHub (Sep 15, 2023):

In that case, that sounds like it could be the basis for at least two FR's.

I'll do my best :-)

@peteeckel commented on GitHub (Sep 15, 2023): > In that case, that sounds like it could be the basis for at least two FR's. I'll do my best :-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8618