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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update multiselect custom field using Automation for JIRA

How do I add value to a multiselect property using Automation for JIRA.

Setting an initial value using JSON is easy and works:

{"fields": {"Revenue Groups": [{ "value" : "Rev. Group 1"}]}

 

Adding an extra is a lot harder. I've tried the following (and other solutions) but without success.

{    "fields": {"Revenue Groups": [{ "value" : "Rev. Group 2"},       {{issue.customfield_13100.asJsonObjectArray("value ")}}]
}
}

1 answer

1 accepted

1 vote
Answer accepted

Hello Andre,

I was able to get mine work by adding the following to the Advanced Edit section of the automation. In my case, I had a multi select (customfield_10037) with values, 1,2,3,4,5,6.

{
"update": {
"customfield_10037" : [
{
"add": {
"value":"2"
}
}
]
}
}

Hi Kian,

Thanks a lot. Works like breeze......

I've an additional question. Where can I find documentation on the operations 'add', 'remove' and 'set'. I'm wondering if there are more options. Starting from the following URL (https://confluence.atlassian.com/automation/advanced-field-editing-993924663.html) I can find a lot info but nothing related to operations as mentioned.

 

Cheers,

Andre

@Kian Stack Mumo Systems 
Hi Kian, does this work with insight multiple custom fields?

I am trying to use automation to add insight values to an insight custom field that is configured to be multiple. 

I added:

{
"update": {
"customfield_32970" : [
{
"add": {
"key" : "PPBCMDB-275620"
}
}
]
}
}


But I am getting some errors in the automation:
PPBSR-3588 (data was not an array (customfield_32970))
Even though the field is configured to be Multiple

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you