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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,422
Community Members
 
Community Events
184
Community Groups

Automation to update custom field with checkboxes

Edited
Kenneth Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2023

I am trying to use the automation to update a custom field that is a checkbox of various options.

The goal in the end is that the custom field may have both options selected

I found the custom field ID from the URL, which is 12500

/secure/admin/EditCustomField!default.jspa?id=12500

When I edit the various options (use blue and green as their option names) as an example, I have the following URLs

t/secure/admin/EditCustomFieldOptions!edit.jspa?fieldConfigId=17069&atl_token=B...5fc_lin&selectedValue=12012
t/secure/admin/EditCustomFieldOptions!edit.jspa?fieldConfigId=17069&atl_token=B...5fc_lin&selectedValue=12013

 

I am assuming that 12013/12012 are the ID for each of the options 

 

When I tire either on of the JSON structures below, the automation returns that the value is not found


{
"update": {
"customfield_12500": [{
"add": {{ "value": "blue" }}
}]
}
}


OR


{
"update": {
"customfield_12500": [{
"add": {{ "id": 12013 }}
}]
}
}

 

In the automation script:

it will look for "blue" in the summary or description, then add blue to the custom field.

it will also look for "green" in the summary or description, then add green to the custom field.

If both blue and green are present then the customfield needs to have BOTH values.

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

Try this.

To set one checkbox value

{
"fields": {
"customfield_12500" : [{ "value" : "blue"}]
}
}

 

To set multiple checkbox values

{
"fields": {
"customfield_12500" : [{ "value" : "blue"}, { "value" : "green"}]
}
}
Kenneth Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2023

Those don't "add" the values to the custom field

I have a two simple if statements

if summary contains blue
then customfield = blue

if summary contains green
then customfield = green

if the summary contains both blue AND green then the customfield should be `blue` and `green`. However, it will only be `green`

 

It seems like the customfield is being overwritten instead of appended.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2023

As I understand it ithe statement will set only the check box values you specify and clear the rest. So if you want to set multiple check boxes you need to use the statement for setting multiple values in a single statement.

Suggest an answer

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

Atlassian Community Events