Jira Automation to copy field value works but value not getting added/displayed

Bharathi
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.
October 4, 2024

Created the below automation to copy a custom field value from Initiative to Epic which is in a hierarchical relationship, on changes to "parent link" field in Epic. The audit log shows as success but the value does not get added to the custom field and instead shows under "original value" and not under "new value" in issue history. Please advise. 

 

image.pngimage.pngimage.png

2 answers

1 vote
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.
October 4, 2024

Hi @Bharathi 

First, in your edit issue action, you are updating the same field twice: once with the field selection (from the dropdown list) and once with JSON.  Only one of those may be used at a time.

Next, your JSON update is referencing the smart value {{webhookData}} but the rule makes no calls with Send Web Request.

Kind regards,
Bill

Bharathi
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.
October 6, 2024

Hi @Bill Sheboy,

Thanks for the inputs. I removed the JSON part and even with the field selection from dropdown, the same thing happens.  The JSON referencing the smart value was another try which failed again.

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.
October 7, 2024

What is the type of the custom field you are trying to copy?

And if it is a multiple-select option field, are you trying to add a value or replace all existing values during the "copy"?

Bharathi
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.
October 18, 2024

@Bill Sheboy, It's a single line text field and we are trying to replace the existing value. 

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.
October 18, 2024

Please post an image of your current, updated rule and the audit log details showing the rule execution.  Thanks!

0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2024

Hi @Bharathi 

 

How did you configure the Edit action ?

Also I do not recommend to use JQL condition when possible. Using multiple field condition is more efficient if you can list status instead of using status category.

 

Regards

Bharathi
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.
October 4, 2024

Thanks @Florian Bonniec for the prompt response! I can remove the condition to check for statuscategory & issuetype since the rule is configured for create/edit/transition issues only but we need to retain the JQL since fields do not support the check for "parent link" field. Tried multiple options for edit fieldsimage.pngimage.png

Bharathi
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.
October 4, 2024

On a parallel note, tried the below as well but no luck.

image.png

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2024

Have you try to use {{issue.Parent Link.customfield_10210}} ?

 

Bharathi
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.
October 4, 2024

Just tried this and the same thing happens. The value gets copied but gets dropped somewhere. In the issue history, I see the parent link getting updated and the value for the custom field is available in "original value" and not in "new value"image.png

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2024

I do not see how to do it using Automation. 

I was thinking about getting the value set in a variable using a branch then use the variable to update the field value but it seems that the variable only live within the branch and not within the entire automation rule. Not sure if it's the expected behaviours.

 

Trigger

For JQL (key = {{issue.Parent Link}})

      Create variable X = {{issue.customfield_XXXXX}}

      Log Action X

Edit Issue using X

 

But in this example, log action X will return the expected result but when using it for Edit it's empty.

Bharathi
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.
October 7, 2024

Exactly! The value gets copied but doesn't get added and in the end, its empty.

Suggest an answer

Log in or Sign up to answer