Automation to clone an issue with Assets objects custom fields?

Brock Jolet
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 17, 2024

I'm building out an automation that creates a number of subtasks when a specific issue type is used. I want to use the clone function to ensure that all data is transferred from the parent issue to the new children. For all of the standard fields, this works as intended.

However, I am using some Assets objects custom fields and these seem to be ignored by the clone function. I have thus tried to alter the automation rule to specifically update these fields with the value of the same field in the triggerIssue but am not finding success.

 

Does anyone have any insight into this?

 

Example: Custom field 10766 is named "User Loadout"

I have tried using smart values such as {{triggerIssue.customfield_10766}} and {{triggerIssue.User Loadout}} as the input on the clone issue action, but it seems these custom fields want AQL. So instead, I tried 

objectId = {{triggerIssue.customfield_10766.id}}

But that doesn't work either. 

 

The clone is happening, but these fields are empty in the resulting issue. The audit log is displaying this error:

Clone issue

An error occurred while requesting remote information

Bad Request

Issues cloned successfully

Issue Key

Screenshot 2024-05-17 105914.png 

2 answers

1 accepted

2 votes
Answer accepted
Brock Jolet
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 17, 2024

For anyone wondering, I did figure out a way to make it work.

I stored all of the IDs in my custom field as a variable called userLoadout.

Screenshot 2024-05-17 150257.png

Then I was able to reference it as a smart value in my AQL as such: 

objectId in ({{userLoadout.remove("[").remove("]")}})

That worked to populate the field during the clone action.

I'm not sure if the bracket removal bit is necessary, but I wanted to be safe if it printed as an array. 

0 votes
Kelley R
Contributor
November 20, 2024

This solved a several hour issue I was having. Thank you so much. Would highly recommend Atlassian add this to the official work around instructions, as this is much more useful. 

Suggest an answer

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

Atlassian Community Events