Forums

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

Make a field required based on another field's value

Apryl Harris
Contributor
June 10, 2024

Hello Community,

My use case:

Make a field required based on another field's value. For example, if field A = Yes, then field C (text field) is required. If field A = No, then field C (text field) is NOT required.

Instance limitations:

Only Jira Cloud native features available; and no option to purchase add-ons (no script-runner).


Anyone been able to solve for this use case? Your help would be greatly appreciated.

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
June 10, 2024

Hello @Apryl Harris 

What you want cannot be implemented with native Jira functionality. It requires a third party app.

A partial solution is to use Validators in Workflow transitions. You could create specific transitions for when field A is No, and when field A is Yes by setting Conditions on those transitions. On the transition with the A=Yes condition add a Validator to require an entry in field C.

That only checks when there is a status change being executed.

If a user edits Field A at another time. There is no way to require an entry in field C in real time, with native Jira functionality.

You could create an Automation Rule that would be triggered by a change of Field A to Yes. In that rule you could check if Field C has a value. If it does not you could automatically change Field A back to No and send a message to the initiator that they need to first fill in Field C and then they can change Field A to Yes.

Apryl Harris
Contributor
June 11, 2024

@Trudy Claspill 

The automation rule might work well enough. What would be the specific rule configuration? I initially thought of that but couldn't get it to work. I can try again.

Thank for your assistance.

Trudy Claspill
Community Champion
June 11, 2024

 

Trigger: Field value changed
Field: Field A

Condition: Field value condition
Field: Field A
condition: equals
Value: Yes

Condition: Field value condition
Field: Field C
condition: is empty

Action: Edit Issue
Field: Field A
Value: No

Action: Send Email
To: Initiator
Subject: {{issue.key}} requires entry in Field C
Content:
You attempted to change Field A to Yes in {{issue.key}}.
That is not allowed without an entry in Field C.
Field A has been reverted to No.
Please make the correct entry in Field C, then change Field A to Yes.

 

Apryl Harris
Contributor
June 11, 2024

@Trudy Claspill 

THANK YOU! I'll try it and let you know how it works.

Apryl Harris
Contributor
June 15, 2024

Hi @Trudy Claspill ,

IT WORKED!  Thank you so much :). 

Suggest an answer

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

Atlassian Community Events