Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Organization value to custom field

David
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.
April 1, 2022

In my Service project, I am trying to copy the value in the Organizations field to a custom field. I read an earlier post that had the same request and I tried doing what they did but the automation rule keeps failing.

Below is the rule and the JSON for updating the "Customer" field to equal the value of the Organizations field. The rule fails with a message saying "Specify the value for Customer in an array (Customer))"

JiraAutomationRule.png

I have also tried a "add" in place of "set". The Customer custom field is a multi-select dropdown. I originally thought this issue might be that the Organizations value I was trying to set did not exist as a value in the Customer field. I add the value I was setting to the Customer field but that did not resolve the issue.

Any help is appreciated.

 

1 answer

0 votes
Dirk Ronsmans
Community Champion
April 1, 2022

Hey @David ,

That JSON payload is essentially using the REST API. 

So the multi select field is expecting the value to be set in a array and not just directly as the value.

My first guess would be to use (without validating the rest):

"set":"[{{issue.customfield_10002.name}}]"

The square brackets would indicate that is is an array.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events