Hi,
I need a custom field to appear only when another custom field has a certain value.
For example:
If "custom_list" is a single select dropdown with possible values 1, 2, 3, 4
I need the user to add a value to "new_field" only when custom_list value is 1
I use Jira Premium. Is there any way to achieve this?
Hi Aitrhira,
I can confirm you could make a field required when option 1 is selected inside a select list field using the Behaviours feature provided by ScriptRunner for Jira Cloud.
We have an example in our Script Library here, which shows how to do this.
Please note that currently, Behaviours only works on Jira Software company-managed projects, as documented here.
I hope this information helps.
Regards,
Kristian
Thanks, I don't have ScriptRunner though.
Is it possible to do the same with conditions or validators in the workflow?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It could be possible with Validators, but you would need an add-on out of the box to provide the ability to validate this, as I do not believe Jira has validators to do this out of the box.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OOTB you can't do that.
You'll need an add-on, such as scriptrunner.
With scriptrunner you can set field behaviours on transition screens (conditionally show/hide/set mandatory).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With Workflow conditions and validations, this is not possible.
Only If you would have a 3rd party marketplace app to extend your workflows with scripts, like JMWE, JSU, or scriptrunner,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I’m from Forgappify and wanted to share that we’ve been working on a more flexible way to build conditions using Jira Expressions. This led to the Ultimate Validator (now in Beta), which is part of the Workflow Building Blocks for Jira app. It lets you use most of the power of Jira Expressions—but without writing code. Instead, you build conditions through a simple UI Here’s how the configuration for your case would look:
I hope it will help.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Athira Krishnan,
I am Nacho and i am part of the Decadis team.
Is it a possibility for you to use a third party app?
If so, i would like to recommend you our app Jira Workflow Toolbox Cloud.
This app contains many workflow functions that can be used for for many different cases, for example the one that you mention to validate that a custom field is mandatory if another custom field has a specific value.
For this purpose, a Jira expression validator can be created with the following expression:
issue?.customfield_nnnnn?.value == "Option 1" ? issue?.customfield_yyyyy != null : true
"nnnnn" should be replaced for the custom field id of the Select list (single choice) and "yyyyy" should be replaced for the custom field that must be mandatory if "Option 1" is selected.
If you need more information, please feel free to create a ticket on our support portal.
Best regards,
Nacho
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.