Lookup and get the value from an Insight object

Jason Chan August 15, 2022

Hi,

I'm a beginner of using Jira and Insight.

 

I have an Insight Object Schema setup named "Hardware" and Object type "Staff" contains the attributes "Email" and "Computer".

When an issue is created, I would like the Automation to use the reporter's email address to lookup an object that matches with the Staff Email, then return the "Computer" value and edit an Insight Objects custom field of the issue.

What could be the correct syntax to run the lookup and edit the issue by using the Automation?

 

Thank you.

3 answers

0 votes
Iman Attia January 11, 2023

Lookup objects: in automation via the hardware schema;

 

Query:

"Email" LIKE "{{issue.reporter.emailAddress}}" AND objectType in objectTypeAndChildren("Staff")

 

This will return the staff profile, you can then add use edit to add:

{{lookupObjects.Computer}} or something along these lines

0 votes
David Sumlin
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.
August 15, 2022

You may also want to look at an Insight workflow post-function

0 votes
Bill Sheboy
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.
August 15, 2022

Hi @Jason Chan 

Please take a look at this documentation, and then use your field on reporter's email address in the IQL query with Lookup Objects to get at the data: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/#SmartvaluesInsight-Lookupobjects

Kind regards,
Bill

Jason Chan August 17, 2022

Hi Bill,

I've managed to lookup the insight object in the automation rule, now I want to add a component to check if the object can be found before editing the issue.

What condition should I use?

Thank you.

Bill Sheboy
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.
August 17, 2022

Perhaps try the advanced compare condition, referencing your object and check if it is non-null (not empty) before the edit.

Suggest an answer

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

Atlassian Community Events