Forums

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

Is there a way to make a user fill out a field based on a value selected in another field?

Yana Gifford
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2023

We have a lot of Critical Priorities choices ( due to highly regulated area of work) 

So we have created a Custom Field so what i need to happen is when someone selected regular Critical Priority I need Jira to ask them to select a value from my Custom Field for a level of critical priority.

Does this make sense?

Thank you

1 answer

1 accepted

3 votes
Answer accepted
Darryl Lee
Community Champion
January 17, 2023

Hi @Yana Gifford

Forms

If you are open to using a Form for letting people enter data (which might make sense in a highly regulated area of work) and can work within a Jira Service Management project, then you could create conditional/dynamic fields like what you're describing.

(There is an unsubstantiated rumor that Form functionality may some day be coming to Jira Software projects or may be available upon request from support.)

Anyways, Forms are cool, but make things a little more complicated, as you may need to link form fields to Jira fields, depending on what you want to do with the data.

Jira Expressions

There is another option to make certain fields required when another field (for instance Priority) is set to a particular value (like Critical).

I'm not a huge fan of this approach because the User can't immediately see the change. They have to try submitting first, and then get an error.

This can be mitigated with field descriptions and info text, but it's still not a great experience.

Here's a great example from @David Fischer using JMWE's Field Required validator: Can a field be set to mandatory based on the value entered for another field? 

But Jira Expressions are available in many different apps, as I've detailed here: Jira Expressions - But Why? 

Behaviours

For a long time on Server/Data Center you could use ScriptRunner Behaviours to do something like this. Welp, after a long wait, Behaviours are finally available on Cloud, but unfortunately not (yet) with full feature parity with the on-prem version.

Notably, you can Hide/show field (based on another field's value), but you cannot Make field required.

Workflow Step

In researching this answer, I came across a unique approach from @John Funk that I had not thought of before:

1. Create two transitions in your workflow for the point you want to make sure that RCA is populated (like the transition to Done). 

2. For one transition, place a condition where the Priority = Highest or High. 

3. For the other transition, place a condition where the Priority != Highest or High.

4. Then place a validator on the transition in Step 2 above to make the RCA field required. 

It's not pretty but it should work for you. 

I'll agree with John that it's not pretty (because for one thing, after people select a Priority, they won't know that they then need to click on the next step to either choose a level -- you can't "trigger" a workflow step from another workflow step -- or proceed to the step you really want to get to. Sorry John!)

But I thought I'd throw it out there because it's an interesting approach that may not be a fit here, but could work in other situations.

Here's the original answer.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events