Checkboxes options as required

I have a checkbox custom field and it has 5 options. I want all the 5 options to be required. How do I make sure the user has selected all options before submitting the form. How do i make all the options as required ? All we have now is a field as required but how do we make the options as required ?

2 answers

1 accepted

This widget could not be displayed.

Solution and I fixed it.

Created a validator in workflow on create issue. Used built in script runner to check a customfield checkboxes values. All the checkbox field is required field. All the checkboxes need to be selected to create an issue.

cfValues['Please acknowledge'][0].getValue() == 'option1'
cfValues['Please acknowledge.'][1].getValue() == 'option2'
cfValues['Please acknowledge'][2].getValue() == 'option3'
cfValues['Please acknowledge.'][3].getValue() == 'option4'


Thank you for your suggestion.

This widget could not be displayed.

You'll need a validator to do that in workflow.

The standard "mandatory" field stuff will accept any one (or more) options being selected as "this has been filled in".

I tried to add a validator on create issue and mentioned by conditions as

cfValues['Please acknowledge'][0] == 'Yes'
cfValues['Please acknowledge.'][1] == 'Yes'
cfValues['Please acknowledge'][2] == 'Yes' cfValues['Please acknowledge.'][3] == 'Yes'

It validates the checkboxes but it won't let me create the issue. I am getting the error message when i click create issue button , please select all the checkboxes .
What am i doing wrong. Please help me out.

I see this message in logs
2012-08-13 13:06:38,785 TP-Processor8 ERROR user 786x13496x1 16q0vol 10.203.201.222 /secure/QuickCreateIssue.jspa [groovy.canned.utils.ConditionUtils] javax.script.ScriptException: java.lang.NullPointerException: Cannot invoke method getAt() on null object
2012-08-13 13:06:50,159 TP-Processor9 ERROR user 786x13497x1 16q0vol 10.203.201.222 /secure/QuickCreateIssue.jspa [groovy.canned.utils.ConditionUtils] javax.script.ScriptException: java.lang.NullPointerException: Cannot invoke method getAt() on null object
2012-08-13 13:07:56,377 StreamsCompletionService::thread-1607 WARN anonymous com.atlassian.streams.internal.ActivityProviderConnectionMonitorImpl:activityProviderMonitor [atlassian.streams.internal.AppLinksActivityProvider] Unable to retrieve filter options from /rest/activity-stream/1.0/config?local=true

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

42 views 0 0
View post

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