Populate Jira Custom Insight field with multiple objects through Jira Automation

Jordi Garcia May 18, 2022

I'm trying to fill two Jira Custom Insight Fields through Jira Automation. It works fine when I populate a custom field with a single object but I can't get it to work with multiple objects.

  • Custom field allows multiple values
  • Custom field is linked to the issue type and is visible and works through the UI

Attaching some pictures of the configuration.

Field configuration (devices)

Screen Shot 2022-05-18 at 21.15.03.png

 

Field configuration (users)

Screen Shot 2022-05-18 at 21.15.21.png

Jira Automation logs (final result is success). Each field returns de expected results

Screen Shot 2022-05-18 at 21.15.57.png

Automation step to create new ticket with data from parent + insight objects

Screen Shot 2022-05-18 at 21.16.13.png

Example of ticket created by automation. Description field gets values correctly but both insight object fields are not populated. Similar fields get assigned properly setting the value through the automation fields instead of the custom "additional fields" JSON.

Screen Shot 2022-05-18 at 21.16.40.png

 

Hope someone can help!

1 answer

1 accepted

5 votes
Answer accepted
Connor
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.
May 18, 2022

Hi Jordi, 

I encountered a similar issue when trying to populate a Jira Insight object field with multiple values in an automation rule. When I tried to set the value of the Insight object field during the create issue action, the field would always remain empty. 

BUT the field would populate properly if I set the value of the Insight object field using an edit issue action after it was created. Give that a try and see if it works for you.

My situation is slightly different than yours so YMMV. On the edit issue action I chose the Insight object field and set the value using an IQL query, instead of setting the field value using lookupObjects and the "Additional fields" section. 

Also take a look at the examples found here, maybe they're what's needed to get the value set properly when setting it through the "Additional fields" section.

Jordi Garcia May 18, 2022

You are right Connor, thanks so much for the tips!!

It was easier than I thought... I got confused by the blue banner next to the fields and somehow I thought that I couldn't use this method to populate multiple values... I did now read it twice and give it a new try and worked perfectly!

Screen Shot 2022-05-18 at 23.32.34.png

 

Screen Shot 2022-05-18 at 23.36.25.png

I was able to do it within the issue creation field without an extra step (edit). I have a issue type edit step after the ticket creation anyway...

In your case maybe is because it doens't have the right issue/request type on the ticket creation and the fields you are trying to edit are not available yet?

In any case, thanks so much for your input here. I've been smashing my head against a wall for some good hours...

Like Connor likes this
Connor
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.
May 18, 2022

Glad I could help Jordi, you might be right about the fields not on the creation screen I'll have to take another look at it.

Aleksandra Leesment September 4, 2023

Hey Connor! Looks like this function stopped working. I started to get "Bad Request" error. Did Atlassian change 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