Forums

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

How turn a field to mandatory under condition?

Emiliano Visioli
Contributor
January 9, 2024

Hi everyone,

I was wondering if it's possibile to make a field mandatory when a specific value is selected in a previous field of the same issue.

Example:

In the Creation screen of an issue I must fill the "Priority" field with one of 2 values: High or Low.

Another field, put after Priority and called "Due date", is not mandatory by default.

I'd like that the Due date field become mandatory only if in Priority user selected "High".

Is it possibile?

Thank you,

Emiliano

1 answer

1 accepted

0 votes
Answer accepted
Florian Bonniec
Community Champion
January 9, 2024

Hi @Emiliano Visioli 

 

You cannot do it by default in JIRA, you will need an app for this use case. There is a couple out there that should allow you to do it such as JSU, Workflow Toolbox and Scriptrunner.

 

If you have Scriptrunner you could use the Behaviour feature to write a script that do this validation. But it will be apply only from the UI, not the REST API. If you need to have this condition all the time you could add a script validator.

https://docs.adaptavist.com/sr4js/latest/features/behaviours

https://docs.adaptavist.com/sr4js/latest/features/workflows/validators/custom-validators

Regards

Emiliano Visioli
Contributor
January 11, 2024

Thank you Florian, all clear :)

Suggest an answer

Log in or Sign up to answer