Automation Errors out when copying multiple fixversions from a parent issue

Jeffrey Bistrong
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.
January 15, 2023

The business has a requirement to keep fixversions on issues and their sub-tasks in sync.

 

I utilized the post-function to copy fixversions from a parent to a sub-tasks when the sub-task is created (this is not automation and works fine).

 

However, when the sub-tasks have already been created, if a user changes the fixversions on a parent, i need the fixversions to get copied down into the child sub-task. 

Since the fix versions is a read only field on the sub-task I can't do a regular edit, and instead need to used the advanced section to copy down the fix versions from the parent. 

 

Here is my automation rule 

Monosnap Automation - Jira 2023-01-15 17-42-47.png

Monosnap Automation - Jira 2023-01-15 17-43-00.png

Here is the error I receive

Monosnap Automation - Jira 2023-01-15 17-46-52.png

1 answer

1 accepted

2 votes
Answer accepted
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.
January 15, 2023

Hi @Jeffrey Bistrong 

As you are trying to set the fix versions to one (or more values), you will want to make the edit handle all cases, as shown here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Fix-Versions

Your two options are to do that by splitting the values to add them one by one with a list iterator, or to use the JSON functions on the source, trigger issue's field, as described here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/#asJsonObjectArray-keyName-

Kind regards,
Bill

Jeffrey Bistrong
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.
January 16, 2023

@Bill Sheboy  thanks so much. This is exactly what I needed. 

 

In addition to adjusting the smart value in the variable, I had to adjust the json in the advanced edit. Sharing my screen shots here for others. Monosnap Automation - JIRA 2023-01-16 08-16-57.png

Monosnap Automation - JIRA 2023-01-16 08-17-05.png

Like # people like this

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