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

Automation with checkbox to be ticked

lila
Contributor
August 1, 2024

Hey there,

I want to automatically copy information from an Epic to a linked issue (in JIra discovery product) when certain fields in the Epic are filled out.
This is working for all fields except I can't get the checkbox field to update correctly. It doesnt tick the actual checkbox, just remains un-checked. 

I have tried with both smart values without success:

{{triggerIssue.customfield_11360}}

{{triggerIssue.customfield_11360.value}}

Screenshot 2024-08-02 at 1.42.08 PM.png

2 answers

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.
August 2, 2024 edited

Hi @lila 

To set or clear a built-in checkbox field for JPD, I believe the advanced edit with JSON is required, under More Options.

For example, to set the field use the custom field ID and the value of 1:

{
"fields" : {
"customfield_10120": 1
}
}

You wanted to conditionally set the field, based on a field in the Epic being set.

What is the type of the field in the Epic?  If it was a text field, this may work, using conditional logic:

{
"fields" : {
"customfield_10120": {{#if(triggerIssue.customfield_11363.isNotEmpty())}}1{{/}}{{#if(triggerIssue.customfield_11363.isEmpty())}}0{{/}}
}
}

 

Please substitute in your custom field ID for the R&D field.

 

Kind regards,
Bill

lila
Contributor
August 5, 2024

Hey Bill, both are checkboxes. The first one worked well, thank you! 

Like • Bill Sheboy likes this
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.
August 6, 2024

Awesome; I am glad to learn that helped!

Please consider marking this question as answered to help others with a similar need find solutions faster.  Thanks!

lila
Contributor
August 6, 2024

Thanks Bill, you're my secret hero :P

lila
Contributor
August 7, 2024

Hey Bill, i just realised i cant use your first json because it only ticks the checkbox on the lined issue regardless if it is ticked or unticked at epic level. The conditional json isnt correct though according to jira?  

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.
August 8, 2024

Hi @lila 

Would you please post images of your current rule action with the JSON attempted and of the error you are seeing?  Thanks!

lila
Contributor
August 8, 2024

Screenshot 2024-08-09 at 9.06.27 AM.png Screenshot 2024-08-09 at 9.06.38 AM.png

lila
Contributor
August 8, 2024

Screenshot 2024-08-09 at 9.08.12 AM.png

lila
Contributor
August 8, 2024

The rule works for everything but just the json is not correct 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2024

Which field is 11335? And is that field selected in your Edit issue list of fields? If so, take that out there because you are updating it with the Advanced section. Not saying it will cure the syntax error, but will be cleaner. 

lila
Contributor
August 11, 2024 edited

Fields 11335 is the R&D checkbox equivalent in jira product discovery. This one doesnt appear in the drop down unfortunately so i have to specify it in the advanced field. 
Ive just tried a different way with a conditional, if R&D (from epic) is empty > 

{
"fields" : {
"customfield_11335": 0
}
}

if R&D (from epic) is not empty:


{
"fields" : {
"customfield_11335": 1
}
}

However, it only works for ticking the box not unticking :( 

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.
August 12, 2024

I just tested this again for a JPD checkbox field and it worked correctly.

Please post an image of your current, complete automation rule and an image of the audit log details showing the rule execution for cases of setting and clearing the checkbox.  Those may provide context for what you are observing. 

Thanks!

lila
Contributor
August 12, 2024

Hey Bill, i posted images of the full automation above along with audit log result. 
Your initial json worked, albeit only for selecting the boxes, not for unselecting. So by default it was selecting the checkbox alwasy. the second one is the one with the above error screenshot (not valid json)

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

@lila @Bill Sheboy 

Was there ever any resolution for this?

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.
August 23, 2024

Hi @lila 

If this is still not working...

Please copy the dynamic JSON from the Additional fields section and write that to the audit log before the Issue Edit action, and re-test.  With that, we can observe what is causing the problem with the JSON.

Thanks!

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2024

Hi @lila 

Is this a regular Jira Checkbox field? Or is it a field from an add-on like Checklist Pro?

lila
Contributor
August 5, 2024

Regular :)  the first json from Bill worked well - thank you!

Like • John Funk likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events