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

Creating Jira automation to update linked Insight asset value

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

Ugh!  My brain is mush and I deleted the automation that did this!

I'm trying to remember how to piece this together.

I have specific JSM issue types that have a custom field that references an Insight object.  On certain transitions, I'd like the Jira Automation to update that object's Status field.

I seem to remember that I have to have an IQL Query condition.  And that you can use the Edit Object operation to update the Object.  But everything else is fuzzy.

 

HELP!

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

Automation doesn't allow you to edit a specific object, so you would have to use the REST API to do it, something like this:

Screen Shot 2022-02-03 at 10.30.53 AM.png 

The object ID is being used in the call to update the status attribute in this case.

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

I seem to remember using the "Edit Object" action to update attributes in the object.Screen Shot 2022-02-03 at 12.32.35 PM.png

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

The Edit Object that is in automation currently is for old Insight, at least based on my own research and the information I got from the product team.

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

I'm almost there.

The if condition passes, but I get a 401 error on the Send Web Request.

I created the API token, appended my email to it and base64 encoded it and added it as the value for Authorization along with the word "Basic".

Am I missing something?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

Are you also including the Accept application/json header?

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

I don't think I am. I'm following the following: https://confluence.atlassian.com/jirakb/update-insight-object-status-to-expired-using-automation-1072219008.html

Where do I include that?

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

Here's what I see when I try to validate the commandScreen Shot 2022-02-07 at 2.53.35 PM.png

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

It looks like you are missing the object ID, your URL should look something like this:

https://api.atlassian.com/jsm/insight/workspace/<workplaceID>/v1/object/{{objectID}}

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

Yeah, somehow the validation is missing that objectID.  Here's what I have for the URL:

https://api.atlassian.com/jsm/insight/workspace/<workspaceID>/v1/object/{{AssetList.key}}

Anyway, I'm off to debug using Postman.  Any tips?

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

Found it.  Missing a comma in the custom body data.

Thanks for helping me out!

Like Mikael Sandberg likes this

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