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

Set Insight objects to a Jira ticket by an automation

Razvan Nechifor July 9, 2021

Hello,

How I can set automatically an insight custom field on a ticket based on the Reporter of the ticket.

Manually is working by configuring the Insight custom field as described below:

Insight Custom field config.jpg

When I try to edit the field, only the objects related to the reporter are displayed.

But when I try to use the same Filter to populate the field automatically when the ticket is created, the objects that are brought in the field are totally different (and not related to the reporter).

Insight automation.jpg

1 answer

1 accepted

0 votes
Answer accepted
Alex van Vucht (GLiNTECH)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2021

Try using the "Lookup Objects" action to find the objects you want, then assign them to equipment with: Key IN ({{lookupObjects.objectKey.join(",")}})

The Issue Scope IQL is so new that I wouldn't use it in this way, I'd specify a Filter Scope to at least narrow it with "objectType IN objectTypeAndChildren(<parent object type>)".

Anyway I'm not entirely sure what's going on here, Insight Cloud is a bit weird with Atlassian Accounts and user attributes anyway. It's safest to separate the search action from the field editing action, because then you can inspect what's returned through an Audit Log action.

Razvan Nechifor July 12, 2021

I've tried to use Lookup Objects, but I didn't manage to obtain any assets. I've used this filter:  objectType = Laptops AND object HAVING outboundReferences(objecttype = Users AND "Jira User" = currentReporter()) filter) 

in order to obtain all the laptops related to the Reporter. When I am using the same filter on IQL advance search field and change currentReporter() with currentUser() it is working... only laptops related to current user are displayed. 

Adam Gołaszewski December 12, 2021

Hi Razvan, not sure if you found an answer to this but you can actually use a smart value inside a lookupobjects iql query.  Your query should look like this: 
objectType = Laptops and "Jira User" = {{reporter}}. This is, if your object attribute is of type user.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events