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

How to update Asset type field using Jira automation and smart values

Danilo Simic
Contributor
June 4, 2024

Hello,

 

I have setup an automation rule which looks up some objects and then updates 2 text fields with attributes from that object (always finds 1 object).

Now I want to improve the rule so that I can also show which object it found by adding the object to an Asset type field. 

I am having trouble updating this. The rule always finds the correct object but when I try to update the Asset field using smart values I get this error:

AD-13 (data was not an array (Test Asset))

"Test Asset" is the name of the field that I am trying to update.

 

The smart value used is this one:

{{lookupObjects.id}}

I have also tried {{lookupObjects}} but got same error.

 

Using the log option, I get the correct ID/Name of the object.

 

I have an Edit issue component with the following:

{
"fields": {
"customfield_10243": "{{lookupObjects.id}}"
}
}

Like mentioned above, I also tried {{lookupObjects}} but got the same error.

 

2 answers

1 accepted

1 vote
Answer accepted
Vijay Dadi
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.
June 5, 2024
0 votes
Danilo Simic
Contributor
June 4, 2024

A solution that I found but that I do not like (I would like to use the Advanced option of the Edit Issue component to update multiple fields at the same time) is to have a separate Edit Issue component for this 1 field and then add this:

objectid = {{lookupObjects.id}}

This works fine. 

 

If anyone knows how to use the Advanced option to update this that would be great.

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