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?