Using Groovy Script Runner how do I validate Checkboxes

Susan Hauth _Jira Queen_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2013

Hi, This is a very simple question from a non-progarmmer. I have a Checkbox custom field (e.g. Reset Type) and I want to use the fast track based on one of the checkboxes being checked. So if custom field "Reset Type" had checkboxes with values: "Citrix", "Support", how would I write the validator to know that they have selected "Citrix"?

2 answers

1 accepted

5 votes
Answer accepted
JamieA
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.
January 14, 2013

This question has been asked quite a lot... the answer is:

cfValues['Reset Type']*.value.contains("Citrix")

Susan Hauth _Jira Queen_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2013

Jamie, I seriously don't know what I would do without you!!! Thanks...it worked...

JamieA
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.
January 14, 2013

;-) ... no problem.

Georges Moubarak
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 22, 2015

Dear @Jamie Echlin [Adaptavist] , Is there a way to do the same with Jython?

Akshay Bhagwat April 28, 2020

I am getting below issue, Please help me to resolve this.

groovy.lang.MissingPropertyException: No such property: cfValues for class: Script6 at Script6.run(Script6.groovy:1)

0 votes
RichardA April 22, 2020

Hi @JamieA 

The issue can be Auto-closed only when All the values of check box is enabled.

Suggest an answer

Log in or Sign up to answer