JQL requiring all options of checkbox field?

Hi,

I'm trying to write an automation rule (with either SD native automation or Automation Lite) to alert users if all values in a custom multi-select checkbox field were not selected. I'm getting tripped up because I need it to run if not all values were checked, whether that means none of them were checked or only some of them were checked.

Alternately we do have the JMWE add-on, which includes the Scripted (Groovy) Validator, but I'm not confident enough to write a non-declarative validation rule that would require all of the values to be selected. I've found the below helpful ScriptRunner validator, but we don't have that add-on.

cfValues['Please acknowledge'][0].getValue() == 'option1'
cfValues['Please acknowledge.'][1].getValue() == 'option2'

 Thanks in advance!

2 answers

I did actually find an answer for the JQL (see below), but if anyone can make suggestions for the Groovy validator that would be greatly appreciated.

"Field" is not EMPTY AND NOT ("Field" in ("option1") AND "Field" in ("option2")
0 vote

Hey there Alexandra,

With Automation for Jira, you can use the "size" property of your custom field value. So in your case, you'd want to add a Compare condition that matches the number of selected options.

image.png

Hope that helps!

Cheers,

Mark C

Thanks Mark, but we actually only have Automation Lite, not Pro. Your suggestion is much cleaner than what I used in the native SD automation, tho (because the values are so so long). Appreciate your help!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

830 views 2 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you