Skip to content

Conversation

arthanson
Copy link
Collaborator

Fixes: #4347

Add JSON/YAML import support for all objects. Changes DeviceType and ModuleType import to use the standard BulkImportView. Changes BulkImportView code and forms to incorporate the JSON and YAML import code.

@arthanson arthanson changed the title 4347 Add JSON/YAML import support for all objects FRAFT: 4347 Add JSON/YAML import support for all objects Sep 14, 2022
@arthanson arthanson changed the title FRAFT: 4347 Add JSON/YAML import support for all objects DRAFT: 4347 Add JSON/YAML import support for all objects Sep 14, 2022
@arthanson arthanson changed the title DRAFT: 4347 Add JSON/YAML import support for all objects 4347 Add JSON/YAML import support for all objects Sep 14, 2022
@arthanson arthanson marked this pull request as ready for review September 14, 2022 22:23
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Sep 26, 2022
@jeremystretch
Copy link
Member

Sorry it's taken so long to get around to this. This is a great start!

@jeremystretch
Copy link
Member

One thing we still need to consider is how to replicate the field accessor function from the CSV import to the JSON and YAML imports. For example, you can specify region.id when import sites to reference regions by numeric ID rather than by name. Ideally, we'd support the same mechanism so that both of the example below work:

{
    "name": "Site 1",
    "slug": "site-1",
    "status": "active",
    "region": 4
}
{
    "name": "Site 1",
    "slug": "site-1",
    "status": "active",
    "region": {
        "name": "Africa"
    }
}

@jeremystretch jeremystretch merged commit 93e7457 into feature Nov 10, 2022
@jeremystretch jeremystretch deleted the 4347-json-import branch November 10, 2022 16:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants