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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

56 views 0 5
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