Automatically required some other fields refer to specific field when creating ticket Edited

Hi,

Is there some way that if the specific field is marked for 'Yes' then we will automatically require some other fields to fill in when creating a Jira ticket?

Here are what I have tried:

  1. I can set some fields to be required to fill in for any issues in JIRA. But I can't set some fields to be required according to the value of another field in "Field Configuration".
  2. I tried to add some fields in Workflow -> Transition. The "Create" transition has no "Condition", and only has "Validations". It can't meet my requirements.

Any suggestion and workaround are welcome!

Thanks in advance!

-Maggie

2 answers

1 accepted

1 vote
Alexey Matveev Community Champion Jan 25, 2018

Hello,

You would need to use an add-on like Power Scripts or Scriptrunner. You could create a custom validator which would implement your logic. Validators work after you push the submit button. If you want to make your applicaton more responsive then you could use Power Scripts Live Fields or ScriptRunner behaviour. In this case your logic would be implement upon changes to the dependent field.

You can read more about validators in Power Scripts and ScriptRunner here:

https://confluence.cprime.io/display/TR/Validators

https://scriptrunner.adaptavist.com/latest/jira/custom-workflow-functions.html#_validators

You can read more about Power Scripts Live fields and ScriptRunner behaviours here

https://confluence.cprime.io/display/TR/Make+a+custom+field+required+based+on+another+custom+field

https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

1 vote
Ivan Tovbin Community Champion Jan 25, 2018

Hi Maggie,

The good news is that you can do that by adding a validator to your 'Create' tansition.

The bad news is that you'll need to apply that validator conditionally, and for that you'll need to do some scripting, which requires a 3rd party addon like ScriptRunner or JMWE.

Also bear in mind that you have to be VERY careful with your validators on "Create" transition because they can prevent issues from being created if configured incorrectly.

@Ivan Tovbin Thanks for your reply!

I want to create an issue in the normal way if the validator is not satisfied, and create the issue with required custom field if the validator is satisfied. Is it possible?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,301 views 14 20
Join discussion

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