how to make the field required if checkbox is selected

I need to be able to make the field required only if the check box is selected.

3 answers

Hi @Darya Koyfman

This could be implemented using a scripted validator on your workflow transition. Where the check is done on both the checkbox and the field to ensure that both or neither are filled in.

Hi @Phill Fox [Adaptavist]Thank you for your quick answer. I need to be able:

  1. If the check box is checked, then one of the field becomes "Required". If it is not, then that field doesn't have to be Required.
  2. I checked all scripted validators on my workflow transaction, and none of them fits to this. I am not a programmer anymore (especially Java), I am JIRA administrator and I create engineering processes.
  3. So, I need a script itself, if it is possible.

    Thank you in advance!
Steven Behnke Community Champion Jan 05, 2016

Customizing the product has always been part of JIRA. You're not going to find anyone who will perform that work for free. If you're interested in the typical methods, most people use the Script Runner add-on to write a transition validation script as Phill noted or use javascript through Script Runner Behaviors. The most permanent solution would be to write a JIRA Connect Validator or a JIRA Plug-in Validator, as these are the ONLY methods Atlassian recommends besides add-ons like Script Runner.

Hi Steven, 

I will try to play with that. 

Thank you!

Steven Behnke Community Champion Jan 05, 2016

It's an Adaptavist add-on, they are usually willing to provide troubleshooting advice here on Atlassian Answers, nice guys like Phill here. :)

@Steven Behnke Thanks for the plug for Adaptavist. @Darya Koyfman You may like to look at the supporting documentation for Scriptrunner at https://scriptrunner.adaptavist.com and in particular https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/conditions/simple-scripted-condition.html for some examples of the power of ScriptRunner.

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published 3 hours ago in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

22 views 0 3
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot