Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Unable to set Insight Object to Jira Issue.


Tried to set Insight Object to Jira issue.

PUT https://*****

Json Body

Looks like above one is for Server/Data center.
It's not returning any error . Status Code is 204 No Content.But Insight Object value not set to issue. (Even some value is there it's getting cleared).

Please let us know how to update Insight Object in cloud versions using Rest API?

2 answers

1 accepted

5 votes
Answer accepted
Mikael Sandberg Community Leader Nov 08, 2021

You could use automation to associate the asset with a request. I have an automation that does that for all of our requests. It basically searches Insight for the owner of asset based on the reporter.

Screen Shot 2021-11-08 at 12.24.29 PM.png

0 votes
Robert Wen Community Leader Nov 08, 2021

Unfortunately, the Insight API works with only the Server/Data Center version of Jira Service Management.

Robert, could you please clarify your response: does it mean that it is not possible to set/update Insight fields in Jira issues - if Cloud Jira instance is being used?

I used different formats suggested in various forums:

customfield_19530: {[{'key':'AZSC-111'}]}
customfield_19530: {[{'0':'AZSC-111'}]}

customfield_19530: {[{'0':{'workspaceId':'xxx','objectId':'xxx'}]}

This is the error I got from the server:

Operation POST rest\/api\/2\/issue failed. Error code: 400 Error: {\"errorMessages\":[],\"errors\":{\"Tenant\":\"expected Object\"}}"

Robert Wen Community Leader Apr 05, 2022

For JSM Cloud it appears that the expected method is using automation as shown by @Mikael Sandberg 's answer.

Actually, the solution that worked at the end was suggested in this thread:

One trick is to set this value via UI manually for one Issue and retrieve it via "Get Issue" and see what format the value comes back as. Then you can use the same format to send back for new issues.

This is the format that worked. I still wonder why this is not documented anywhere

"customfield_19521": [
"workspaceId": "xxx",
"id": "xxx:11147",
"objectId": "11147"

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events