It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Checkboxes options as required

SRIDHAR Aug 09, 2012

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

0 votes
Answer accepted
SRIDHAR Aug 13, 2012

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.

0 votes
Nic Brough [Adaptavist] Community Leader Aug 09, 2012

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".

SRIDHAR Aug 12, 2012

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

194 views 21 10
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you