Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the JSON syntax for a referencing on object type using an external import?

I am testing external imports and have run into a problem with referencing object types. I have tested the JSON for external imports without referencing object types, and had no problem. For that I used the JSON structure that Atlassian Developer provided: https://developer.atlassian.com/cloud/insight/imports/schema-and-mapping/#reference-type-attributes

Atlassian Developer also provides a JSON guide that includes referencing object types: https://api.atlassian.com/jsm/insight/imports/external/schema/versions/2021_09_15

I have been trying to follow their JSON for referencing object types but I keep getting this error: 

{
    "jsonValidationErrors": [
        {
            "type""required",
            "code""1028",
            "path""$.schema.objectSchema.objectTypes[1].attributes[12]",
            "arguments": [
                "referenceObjectTypeName"
            ],
            "details"null,
            "message""$.schema.objectSchema.objectTypes[1].attributes[12].referenceObjectTypeName: is missing but it is required"
        }
    ],
    "dataValidationErrors": [],
    "status""error"
}
I am wondering if anyone can help me to understand what the error is referencing, and what I can do to fix it?
Thank you!
Picture1.PNGPicture2.PNGPicture3.PNGPicture4.PNGPicture5.PNGPicture6.PNGPicture7.PNGPicture8.PNGPicture9.PNG

1 answer

I was reviewing the information at the Atlassian Developer website and found something I was missing. For the attributes that are referencing other attributes I used this format:
{
"name":"UserID",
"description":"",
"type":"referenced_object",
"referenceObjectTypeName":"users"
}


In the Mapping, I used this format:
{
"attributeName": "UserID",
"attributeLocators": [
"UserID"
],
"objectMappingIQL": "UserID is not EMPTY"
}

I was not including the object mapping IQL, and I was not correctly specifying the "type" and "referenceObjectTypeName" in the object type.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

703 views 5 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you