Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a text Custom field mandatory or optional based on the value we select from drop down?

Dinesh Loyapalli April 17, 2018

I have a drop down custom field X and Text Custom field Y in create screen of EPIC.

Lets say Drop down custom filed has values A and B.Now if we select A ,Text filed should be made mandatory and when we select B it should be made optional.

We have recently started using Script runner.Any help would be greatly appreciated.

 

Thanks! 

2 answers

1 vote
M Amine
Community Champion
April 17, 2018

Hi Dinesh,

If you are considering using an add-on which does not require any coding, you can use Dynamic Forms for Jira. It is quite easy to configure what you want and the documentation is well written : Here is a link to a step by step guide.

keep me posted if you need some help with this add-on. 

cheers

Dinesh Loyapalli April 18, 2018

Hi Mohammed,

Thanks for your response.But as i said , we are using Script runner.Can this be achieved using Script Runner?

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2018

Yes, ScriptRunner gives you two simple options (actually, it gives you a lot more, but these are by far the better ways to do it, unless you have some odd additional needs we don't know)

1.  Create a Behaviour which flips the mandatory/optional flag based on the current content of another field.  See https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

2.  Create a Validator which can check that a user has filled the mandatory field when the other field is set.  See https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events