Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove whitespace on header columns for CSV import #11929

Closed
duckw opened this issue Mar 8, 2023 · 0 comments · Fixed by #11956
Closed

Remove whitespace on header columns for CSV import #11929

duckw opened this issue Mar 8, 2023 · 0 comments · Fixed by #11956
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@duckw
Copy link

duckw commented Mar 8, 2023

NetBox version

v3.4.5

Feature type

New functionality

Proposed functionality

When performing a CSV import, whitespace on the column headers will cause that field to not import. I propose the trimming of whitespace on each of the column headers.

Use case

This avoids the chances of inadvertent missing data on import, which can happen for users particularly when exporting direct from spreadsheet applications and importing directly into NetBox and not carefully checking the header does not contain erroneous whitespace first in a text editor.

Database changes

Nil.

External dependencies

Nil.

@duckw duckw added the type: feature Introduction of new functionality to the application label Mar 8, 2023
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Mar 10, 2023
@kkthxbye-code kkthxbye-code added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Mar 10, 2023
@kkthxbye-code kkthxbye-code self-assigned this Mar 10, 2023
@jeremystretch jeremystretch self-assigned this Mar 13, 2023
jeremystretch added a commit that referenced this issue Mar 13, 2023
* Strip whitespace from csv headers

* Move strip() call to parse_csv()

---------

Co-authored-by: jeremystretch <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants