How to create an issue with insight data

Scenario, there is two JIRA instances A and B. Both having insight installed on them. When an issue is created or updated in JIRA A instance then JIRA B instance shall get an issue with the same data.

Here are the steps that we need to do in order to make it work.

  1. Look up the insight key using the JIRA A insight value 

    /rest/insight/1.0/iql/objects

  2. Create an issue in JIRA B with the looked up key as customfield value
  3. Set the reference of the created key from JIRA B in JIRA A





References, creating / updating issues with insight data using REST

https://documentation.mindville.com/insight/5.0/insight-for-developers/insight-with-jira-rest-api

Get object information

{
    "fields": {
        "customfield_10030": [{"key": "MYKEY-123"}]
    }
}

See the groovy examples to learn how to extract the key from custom field values

Groovy sample scripts