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

CSV import should accept the "slug" value for choice fields #5003

Closed
jeremystretch opened this issue Aug 14, 2020 · 0 comments
Closed

CSV import should accept the "slug" value for choice fields #5003

jeremystretch opened this issue Aug 14, 2020 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

Environment

  • Python version: 3.6.9
  • NetBox version: 2.8.9

Proposed Functionality

For fields which specify one of several pre-defined choices, users should be able to specify the "slug" value rather than the proper string. For example, here are the available slug values and corresponding names for a rack's type:

Slug Name
2-post-frame 2-post frame
4-post-frame 4-post frame
4-post-cabinet 4-post cabinet
wall-frame Wall-mounted frame
wall-cabinet Wall-mounted cabinet

It may make sense to use the slug value consistently for both import and export operations, though I'll leave that open for discussion.

Use Case

NetBox v2.7 replaced the old integer-based choice field IDs with human-friendly slugs. These are more convenient to handle when manipulating data, as extra attention is not needed to ensure correct capitalization, spacing, or punctuation. For example, it is quicker and simpler to write wall-frame than Wall-mounted frame, and the later provides no further information than the former within the context of data entry.

Database Changes

None

External Dependencies

None

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Aug 14, 2020
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Sep 18, 2020
@jeremystretch jeremystretch added this to the v2.10 milestone Sep 18, 2020
@jeremystretch jeremystretch self-assigned this Sep 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2020
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

No branches or pull requests

1 participant