Forums

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

Make Checkbox Field Mandatory

Maximilian Wallach September 16, 2019

So basically i haven't found a single Code that worked for me so i'm asking myself.

 

I have a checkbox wih 2 opions:

grafik.png

"done" and "not required"

i want that i can only submit the card, when i check one of the boxes.

grafik.png

 

Those are the Validators i can use, does anyone have the Code that works for my Problem?

I don't have any Plugins.

3 answers

1 accepted

0 votes
Answer accepted
Derek Fields _RightStar_
Community Champion
September 16, 2019

You can use scriptrunner's Simple Script validator 

cfValues["Kick-Off with GD"] != null
Maximilian Wallach September 16, 2019

 Hours of Research! Finally. Thanks alot!

L June 8, 2023

@Derek Fields _RightStar_ Thanks for the code but even after i have checked the box the issue is not transitioning to done, it is still looking for the value  

Derek Fields _RightStar_
Community Champion
June 9, 2023

What is the code for your validator? Can you provide me with more information? 

L June 9, 2023

cfValues["Log Work"] != null. I am trying to make Log Work (ictime) field as required which is a checkbox custom field when moving issues from IN progress to Done. Everything seems to be working fine but after checking the Log work checkbox and entering time spent on the ticket i cannot transition the issue to done it is still looking for the Log work value

0 votes
RichardA April 27, 2020

Hi @Derek Fields _RightStar_ 

i need to submit the issue when all check boxes are checked. other wise we can't abled to close the issue.

Thanks.

Derek Fields _RightStar_
Community Champion
April 27, 2020

You can still use the simple script validator. If you know the specific number of options, then you use this (this assumes that there are 4 options in the Checkbox LIst):

cfValues["My Checkbox List"].size() == 4
Like RichardA likes this
RichardA April 28, 2020

Hi @Derek Fields _RightStar_ its working :) Thanks.

0 votes
Maximilian Wallach September 16, 2019

@Nic Brough -Adaptavist-I've seen you are quite active, could you help me?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events