Forums

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

Required field based on condition

Jadranka Perc April 19, 2021

Can I have required field based on condition? I would like to have Release notes field required based on the custom field > Target environment. If the target is UAT then released notes required. Thanks!

3 answers

1 accepted

3 votes
Answer accepted
Dave Bosman [Realdolmen]
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 19, 2021

Hi Jadranka,

Out of the box it is not possible but you can achieve this with following plugin.

https://marketplace.atlassian.com/apps/292/jira-misc-workflow-extensions-jmwe?hosting=cloud&tab=overview

Once installed you can use the "field required validator"

Regards

Dave

Jadranka Perc April 19, 2021

Thank you Dave! will try it

0 votes
abelalia87
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.
August 17, 2023

Hi Community,

I added two transitions. First transition, If target is UAT then add validator to transition for Release notes required. Add condition to show if target is UAT. Add second transition, add condition to show if target is not UAT, no validators for the second transition. At any one time only 1 transition will be available to the user. This is prone to breakage if any changes to the custom fields. The transition names will have to be different ("transition", "transition "), I just added a space. To the end user it will look the same. Not very neat though, and prone to breakage. You would also have to consider empty values.  

0 votes
Thorsten Letschert _Decadis AG_
Atlassian Partner
April 21, 2021

Hey @Jadranka Perc ,

A simple 'Field required' validator might not be sufficient for your use case. You should look for a workflow app capable of interpreting Jira expressions (see https://marketplace.atlassian.com/search?category=Workflow&product=jira) and an expression like the following with 12345 being your target and 67890 your release notes custom field:

issue.customfield_12345 != "UAT" || issue.customfield_67890 != null
Jadranka Perc April 22, 2021

Thank you Thorsten!

Thorsten Letschert _Decadis AG_
Atlassian Partner
April 23, 2021

You're welcome, @Jadranka Perc.

If this solution is working for you, please make sure to mark the answer as correct. Thank you!

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