Automation: Update Checkbox Custom Field with Additional Value (Not clearing what is already there)

Celina Kincaid May 16, 2024

I have an automation rule that infers what to set for the checkbox field but it is only 'setting' that value and overwrites any existing checked boxes. 

Can I read in any preset values to a variable and then include them in the 'set' rule?  I have tried this using a smart value for a variable and then the new value but the UI doesn't allow this. 

Does anyone have another secret?

Thank you!

3 answers

2 accepted

1 vote
Answer accepted
Kalyan Sattaluri
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.
May 16, 2024

Hello @Celina Kincaid 

To update the field, instead of overwriting it, you need go to down to the "Advanced Edit" section and provide the JSON there.

 

{
"update": {
"Multi Select": [{ "add": {"value": "Approval A is set"}}]
}
}

 

Like in below screenshot.

If you have smart value, you can pass that aswell like below..

{
"update": {
"Multi Select": [{ "add": {"value": "{{some_smartvalue}}"}}]
}
}

image.png

Reference:

https://community.atlassian.com/t5/Automation-questions/Update-checkbox-field-select-additional-values-with-automation/qaq-p/2245770

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#:~:text=child%22%3A%20%7B%20%22id%22%20%3A%2010115%20%7D%20%7D-,Multi%2Dselect%20custom%20field,-Select%20multiple%20values

 

Please try and share if issues. Hope it helps. Thanks!

 

 

 

 

1 vote
Answer accepted
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 16, 2024

Hello @Celina Kincaid 

I think doing something like this with the Advanced JSON Editing option might work, but I haven't tested it.

replace customfield_12345 with your checkbox custom field.

{
    "update": {
        "customfield_12345": [{
                "add": { "value": "option1" }
        }]
    }
}

 I inferred this from the following documentation, looking at examples for setting a Checkbox field and for adding another value to a multiple selection field.

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Checkbox-custom-field

0 votes
Celina Kincaid May 20, 2024

Thank you both!  That worked perfectly!

Suggest an answer

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

Atlassian Community Events