How to validate checkbox Jira cloud

Josep Maria Cao Garcia December 1, 2021

Hello,

i'm trying to create a scriptrunner validator for a checkbox.

I don't care about the option, because is just one option, i wanna know if the user selected it or not.

This is not working:

issue.customfield_10135.value != null

Thanks

2 answers

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2021

Hi Josep,

I can confirm we have some example snippets for validators located here and the example on line 55 shows an example of how to validate when a checkbox field has a certain valiue set in it and this will help you to create the validator that you require.

I hope this information helps.

Regards,

Kristian

Josep Maria Cao Garcia December 21, 2021

hello, that is not working sorry.. that information is incorrect. thankserrrrr.JPG

0 votes
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2021

Hi @Josep Maria Cao Garcia ,

welcome to the community!

If you don't care what option is selected, you can just use the "Field Required Validator".
Then you don't need to script anything.

Please let me know if this does not work for you.

- Tessa

Josep Maria Cao Garcia December 2, 2021

hello, no, because i have to check more fields, for example, if its selected, two more fields are required too, if its not selected, we wont need others fields validators

Suggest an answer

Log in or Sign up to answer