Forums

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

Can a field be set to mandatory based on the value entered for another field?

Bianca Sarmiento
Contributor
November 9, 2020

Hi, can a field be set to mandatory based on the value entered for another field without the use of a plug-in?

For example, if 'Cross Team Issue' field is selected "Yes" then make 'Delivery Date' field mandatory, otherwise leave as optional.

1 answer

0 votes
David Fischer
Community Champion
November 9, 2020

Not without a plug-in, no.

Only a few plug-ins (apps) can help with that, such as JMWE (our app) or ScriptRunner.

Bianca Sarmiento
Contributor
November 9, 2020

Thanks David. What is the best way to do this in JMWE?

David Fischer
Community Champion
November 9, 2020

You can use the "Field Required (JMWE app)" Validator and use "conditional validation" to activate the validator based on the value entered for another field, for example:

!!issue.priority && issue.priority.name == "Blocker"

would make the selected field mandatory only if the issue's priority is "Blocker"

The Jira expressions editor and its help system will help you write the conditional validation script. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events