-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Ability to specify related objects by attribute during CSV import #3147
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Comments
jeremystretch
added
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
labels
May 3, 2019
jeremystretch
added
status: under review
Further discussion is needed to determine this issue's scope and/or implementation
and removed
status: accepted
This issue has been accepted for implementation
labels
May 3, 2019
I think it makes sense to do something like this:
I'm just not sure how we'd get there. It likely means throwing out the existing CSV import forms and starting largely from scratch. |
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
Dec 13, 2019
jeremystretch
added a commit
that referenced
this issue
May 6, 2020
Closes #3147: Allow dynamic access to related objects during CSV import
Merged
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
Environment
Proposed Functionality
Currently, specifying a related object when importing a new object as CSV data requires the related object to have a unique name. For example, importing an IP address assigned to an interface might look like this:
The combination of device name and interface name forms a unique identifier for the interface to which the new IP address should be assigned.
This proposal would allow a related object to be specified by an arbitrary set of fields. For example:
This would allow the user to have multiple devices named "router3" yet specify the one belonging to site "Raleigh."
The specific formatting is up for debate; the above is intended solely as an illustration of the concept. Special consideration must be given to the use of commas, since parsing of the related object field is being done within the context of processing CSV data.
As I write this, I have to admit it feels like we're trying to squeeze too much functionality out of the CSV format: Maybe a JSON-centric approach would be preferable, but we'd need a low-friction solution for converting spreadsheet data into JSON.
Use Case
This FR was prompted by #2669, which would relax the uniqueness constraint on device and virtual machine names. If a device name cannot be assumed unique, a more robust approach to referencing devices must be implemented. We've already taken a step toward this approach with FlexibleModelChoiceField, which allows referencing an unnamed object by numeric ID (e.g.
{{123}}
).Database Changes
None
External Dependencies
Probably none. We may end up using some external parsing library, depending on the approach chosen.
The text was updated successfully, but these errors were encountered: