Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to pass data validation when reference an object in Jira Assets (JSM) import schema

Armin Zaugg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 4, 2024
I want to import external data in Jira Assets. I am following the instructions available and the schema - https://api.atlassian.com/jsm/assets/imports/external/schema/versions/2021_09_15

I using static data for the imports during the development process to simplify troubleshooting. Mainly I have:

  • The schema file
  • A data file devices
  • A data file manufacturers

I want to reference a manufacturer to the device attributes using the type "referenced_object". Apparently I dont use the correct syntax because I get a data validation error.

INFO    22:19:17.451  812d3ec2a80b4dec811065ced224a263  {
  jsonValidationErrors: [],
  dataValidationErrors: [
    {
      code: 'MISSING_REFERENCE_OBJECT_TYPE_EXTERNAL_ID',
      location: 'Device.Manufacturer'
    }
  ],
  status: 'error'
}

I spent hours fiddling with the syntax, especially setting the "objectMappingIQL" string but was never able to make the import work.

I would highly appreciate detailed documentation or working examples so that I can make progress with my app.


1 answer

0 votes
Pedro Arroyo May 24, 2024

Hi,

it seems like you're not tying your schema and mapping appropriately. See for example:

this is the schema:

{
"externalId": "cmdb::externalId/52742d53-ef1c-44aa-8149-1941c8168f00",
"name": "Home Tablets",
"description": "",
"type": "referenced_object",
"label": false,
"referenceObjectTypeName": "Tablets",
"referenceObjectTypeExternalId": "cmdb::externalId/281e0efe-60a9-41ff-b1fc-69048ece56e0",
"minimumCardinality": 0,
"maximumCardinality": -1,
"unique": false
},
this is the mapping:
{
"attributeExternalId": "cmdb::externalId/52742d53-ef1c-44aa-8149-1941c8168f00",
"attributeName": "Home Tablets",
"attributeLocators": [
"macAddress"
],
"externalIdPart": false,
"objectMappingIQL": "\"MAC Address\" in (${macAddress${0}})"
},

Hope it helps :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events