Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Assets import from JSON, trying to link many to one object

David Helfrich
June 3, 2026

We're trying to use Jira assets to track some fields used in an application so we can track changes and give people a quick way to see what automations may be impacted by changes to a field.  Our application is set up with various templates, each with a number of unique sections, each section having a number of unique fields.  We have to export JSON data from this app per template, and don't have control over the format.  The JSON looks like this abridged sample:

{
     "items": [
          {
               "id": 1234,
               "sectionSelector": "Contacts_1",
               "name": "Contacts Section",
               "customFields": [
                    {
                         "id": 90721,
                         "fieldSelector": "contact",
                         "name": "Contact Field",
                    },
                    {
                         "id": 90210,
                         "fieldSelector": "relationshipToTheCase",
                         "name": "Relationship to the Case",
                    }
          } 
    ]
}

My schema has object types for Templates, Sections, and Fields, all at the same level on the Schema tree.

We already know all the sections in this file are for one template so I'm mapping that manually to a "Template" attribute in the Sections object type. For mapping, Destination attribute type is Object, Reference mapping is Advanced, and AQL is objectID = xxxxx 

The Sections and Fields all get created. The sections all link to the Template as expected, but we cannot seem to map the fields to the section.  

The Sections object type has a "Fields" attribute, of type Object and cardinality to maximum allowed.

On the import mapping for Sections, I tried Data source field "customFields.FieldSelector", destination attribute "Fields", Destination attribute type "Object", reference mapping "Simple" and "fieldSelector".  When I do this I get no links and errors that include 100 duplicates.  Problem seems similar to Solved: JSON Import: Multi-value Object reference attribut...

I've also seen [JSDCLOUD-10665] JSM Insight - Import from csv/json object with multiple cardinality doesn't work - Create and track feature requests for Atlassian products. and the updated documentation.  

Based on these suggestions I changed the reference mapping to Advanced and the AQL is Fields IN (${customFields.fieldSelector}).  I still have the same result. Can anyone help a non-programmer understand this?

1 answer

0 votes
Arkadiusz Wroblewski
Community Champion
June 4, 2026

Hello @David Helfrich 

Two things are tripping you up here: your AQL targets and your schema design.

First, your reference AQL must look at attributes on the Field object itself, not the destination attribute name. The "duplicates" error just means your lookup criteria isn't unique enough. If your JSON has unique IDs, import those and use the multi-value syntax to catch them:

`"External ID" IN (${customFields.id${0}})`

Honestly, the easiest fix is to flip your data model. Instead of managing a complex, multi-value list of fields inside each Section, give the Field object a single reference pointing back to its parent Section. It makes the import cleaner, and Assets will still display the fields on the Section page anyway using inbound references.

Best,

Arkadiusz🤠

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events