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

Copying multi choice custom field value from the linked issue's same field failed

YY Brother
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023 edited
Edit issue
Error editing issues
BM-4 (Option value ' xxx' is not valid (customfield_11238))
Issues edited successfully
BM-4
-----------------
Automation Rule: Copy a multi-select field value from the linked issue's same field:
Trigger: issue creation
Branch: For Linked issues -> create a variable to store the linked issue's Region field value
varFeatureRegion: issue.Region
Branch: For each: Smartvalue:
{{varFeatureRegion.split(",")}}
Action: Edit issue with Additional fields:
{
"update": {
"customfield_11238": [
{
"add": {"value": "{{varRegion}}"}
}
]
}
}
What's the reason why mutiple Region values cannot be copied correctly?
image.png

2 answers

1 accepted

0 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.
February 28, 2023

Hi @YY Brother 

Is that your entire rule?  FYI it can help for a question like this to post images of your rule and the audit log details for context.

If that is your entire rule, please note the Issue Created trigger can fire so fast that the issue data is not available for use in other rule actions.  That can lead to symptoms like what you are describing.  The work-around for that is to add a Re-fetch Action immediately after your trigger.  That will slow down the rule and reload the issue data before proceeding.

If that is not the cause I suspect the cause is your JSON is not well formed to copy the data, as described here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-select-custom-field and here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/#asJsonObjectArray-keyName- Where you would need to dynamically generic the correct JSON.

Kind regards,
Bill

YY Brother
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023

Yeah, I used additonal field to update it correctly. The key point here is that I need to iterate the linked issue's Region field value and then concatenate the JSON value to the additional field.

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.
March 1, 2023 edited

First things first: would you please post images of your current rule and the audit log details showing the execution?  That will provide context for what you are trying to accomplish, and then we can suggest ideas to help.

Next, once we have that info, it should be clearer which issue you are trying to edit: the trigger issue or something else.

And finally...the image will help clear up a problem in the written description of your rule: branches on more than one thing run in parallel and asynchronously.  There is no guarantee of when such a branch will end...up to the last step in the rule.  So, if you in fact have two such branches (as you describe) that rule cannot work as you expect.

There are often work-arounds for that rule structure, but we need to know your goal to help.

Thanks!

0 votes
Nic Brough -Adaptavist-
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.
February 28, 2023

Do both region fields have the same list of options?

YY Brother
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023

yes

Suggest an answer

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

Upcoming Jira Events