Display a custom field values ​​based on value of another

Hi,

As I say in title of this question I want to have in Jira one custom field that display some values based on value of another custom field.

For example, I have one Custom Field 1 with values '1' and '2' and another Custom Field 2 with values 'A','B','C' and 'D'.
I want that if user select '1' in Custom Field 1, then display only values 'A' and 'B' on Custom Field 2, and if user select '2' then display only values 'C' and 'D'.

It is possible in JIRA?

Thanks in advance,

Daniel

4 answers

1 accepted

This widget could not be displayed.

The cascading select field that is built into Jira can do this.

If you need something more complex that what the built-in field offers I would suggest looking at the existing third-party Plugins.

If you can't find what you need there, building a custom plugin that does what you need is certainly something that can be done.

It's not possible with Script Runner Plugin?

This widget could not be displayed.

I think you should created a scripted field for Custom field 2 for reflecting the changes depends on custom field 1

eg.


1 ) Download Script Runner Plug in.
2 ) Create a "Scripted Field" Custom field
3) Go to Admin >> Script Field>> Edit the custom field which you have
recently created.
4 ) Below is an example which select the value from select custom field and
push it the same to Scripted field.

eg code : -

here I am returning the value of Select custom field to sctipted field.


def select = getCustomFieldValue("Select")
if (select) {
return select
}
else {
return null
}

// This script return the value which you have selected in Select custom field, instead you can

// redefine the code as per your requirement.

Cheers

Onkar Ahire

@ Daniel >> You can create using sciptrunner plugin above eg is helpful for you.

Thanks Onkar! Tomorrow I try to implement and I tell to you!

Script runner is a paid plug in. 

This widget could not be displayed.

do you want to hot code custom field optios are do you want to display values from external DB?

if you are hotcoding options then use Cascading customfield.

if you want to display options from external DB, use the following plugin

https://marketplace.atlassian.com/plugins/org.deblauwe.jira.plugin.database-values-plugin

rambanam my values are predefined and don't read from external DB, but thanks for your help! I don't know if in future I want to read from external, so I remember this plugin if I want to do this! Thanks!

This widget could not be displayed.

Hi Daniel,

Were you able to implement your requirement?

I'm trying to do the same, and Onkar's example above does not seem to provide a select list for the second custom field. It only sets the field value. I want to give options to users instead. How did you implement a select list field that has different options (A and B if the first custom field has 1. C and D if the first custom field has 2.)?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

145 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you