Forums

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

Error with automation while updating custom field with checkboxes

Tiago Machado October 25, 2022

Hi there,

I have an automation to automatically check the checkboxes of a custom field.

Using the documentation,

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

 

I did this:

{
"fields": {
"customfield_15423": [{ "value" : "There is a common understanding of purpose and content of the story"}, {"value" : "Acceptance Criteria exists"}]
}
}

What I put in the "value" is basically the fixed test of the checkboxes. So I've tried to do with ID for a single checkbox:

 

{
"fields": {
"customfield_15423": [{ "id" : 1}]
}
}

 

In both cases I have:

"an item name cannot be empty. (customfield_15423))"

 

What am I doing wrong?

 

EDIT:

image.pngimage.pngimage.pngimage.png

2 answers

1 accepted

1 vote
Answer accepted
Maxime Lefebvre _Okapya_
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.
October 26, 2022

Hi @Tiago Machado

I believe you are using our third party custom field "Checklist for Jira", not a multi-select custom field.

Here's our documentation on how to update items using automation, we have an example that checks all items in the list.

Example: (Make sure you change Checklist to your field name instead)

{
"update": {
"Checklist": [
{
"edit": [
{{#Checklist}}
{
"id": {{id}},
"checked": true
}
{{^last}},{{/}}
{{/}}
]
}
]
}
}

 I hope this helps!

Kind regards

Tiago Machado October 26, 2022

Hi @Maxime Lefebvre _Okapya_ 

I've read the documentation and that seems indeed the right way to do it, thanks for that. It seems it checks all the checklist at once, which is exactly what I need.

Unfortunately it's not working, now I don't have any error (it says in the log success, updated issue XXXX). However, those checkboxes remain unchecked.

Any idea why?

image.png

Maxime Lefebvre _Okapya_
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.
October 26, 2022

You also need to replace {{#Checklist}} for {{#customfield_15423}}, there were 2 places to replace.

Let me know how this goes!
Kind regards

Tiago Machado October 26, 2022

I actually tried that first and got an error, but I must have made a mistake because i tried it again and it's working!

 

Thank you very much for your help!

Like # people like this
1 vote
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.
October 25, 2022

Hi @Tiago Machado 

Would you please include an image of your complete rule?  That may provide context for why this error is happening.  Thanks!

Kind regards,
Bill

Tiago Machado October 26, 2022

Hi @Bill Sheboy !

Sure, I've included additional information on the original posting.

Thank you very much in advance,

Tiago

Tiago Machado October 26, 2022

edit: Replied here by mistake.

Suggest an answer

Log in or Sign up to answer