Importing Insight customfield objects into Jira stories

David Loper May 18, 2022

Sorry that this is long... TLDR, I'm trying to import Insight data as Jira stories via JSON and it works but doesn't create the linked issue.

How do I get the imported story to properly link back to Insight?

 

So I spent a lot of time on this and it is working in spite of old/deprecated documentation. I've made an export of Insight data work as an import to Jira which includes various data elements including the Insight 'key' for the object type table and the name of the asset which I can use in the summary and description of the problem while assigning the exact object as a custom field in Jira. I take this CSV export and then do some python magic to create a JSON schema that looks like this (I'm only showing the a brief version):


{
"projects": [
{
"key": "TEST",
"issues": [
{
"description": "Some nice description",
"customFieldValues": [
{
"fieldName": "customfield_10921",
"fieldType": "com.atlassian.jira.plugins.cmdb:cmdb-object-cftype",
"value": "0b8fa9d3-75e3-41f0-a99a-41f548633c24:227229"
}
],
"summary": "Do something with this Insight object <NAME>"
}
]
}
]
}


key = my Jira project

customfield_10921 = my custom field as defined in Settings > Issues > Custom fields

0b8fa9d3-75e3-41f0-a99a-41f548633c24 = the Insight 'Object Field' ID

227229 = The key in insight for that particular object

I've simplified this a lot but this method also supports Epic Linking, Story points, Sprint, Assignee, and other fields. That is all working fine for a short period of time. It even imports the insight object but it doesn't Link the object. Meaning, after the story is created, if I go back into insight it is missing the linked story. Because this link is missing, the object eventually disappeared from Jira!

I can see the difference between this story and a story created manually that this method is NOT creating this structure...


"customfield_10921": [{"workspaceId": "0b8fa9d3-75e3-41f0-a99a-41f548633c24","id": "0b8fa9d3-75e3-41f0-a99a-41f548633c24:214252","objectId": "227229"}],


After the object disappeared in Jira and we reassigned the Insight object into the Jira Story it sent out a notification like this...

 

VMWare Virtual Machine:

ari:cloud:cmdb::object/c154822a-e9fe-4cde-9078-10dd0621c8e6/39570

vmsForDLC_Secure_ID_51

 

So the object seemingly is something ephemeral as ari:cloud:cmdb::object/<the UUID of the Insight Object Type>/<object key> only replaced.

How do I get this data correctly imported? There is a lot of documentation related to a deprecated riada java methods which makes this work previously but I can't find the documentation or method to properly align an imported Jira object to an Insight customfield entry.

0 answers

Suggest an answer

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

Atlassian Community Events