Dynamic population of a custom field on selecting value from other custom field.

I have few custom fields of type drop-down in the Create Issue page.

On change of custom field 1, based on the value selected, I want to populate custom field 2 and so on.

Can anyone help me on how to achieve this.

Thanks in Advance for the help!!!

Ruchika

1 answer

0 votes

Most simple option is to swap custom field 1 and 2 for a "cascading select".

The more complex options involve add-ons to enable this sort of behaviour.

Requirement is to populate these drop down dynamically. On selection of a value from dropdown1 i'll fire a query to get corresponding values for dropdown2 and dynamically populate it with these values.Can I still use cascading select for dynamic values. If yes, can u please provide some sample code on how to do it. I am using Jira version 7.

Yes, that's exactly what a cascading select does. You select an item from the left hand drop-down and that determines the options listed in the second drop-down. You don't need any code at all.

Thanks Nic. But in cascading select what I could see, we beforehand configure static data in the list.Say, for value "A" in dropdown1, I configured values "A1","A2","A3" etc in the drop down2. In my case, I don't have data for dropdown2 beforehand to configure. I'll only get this data from some code which will fire some query in the database and based upon these values which I get will populate the dropdown2. How can this be achieved in Jira.

Oh, hang on, you're saying you don't have the values for the options yet? I think I've misunderstood part of the question. The answer about add-ons definitely applies then. JIRA's options are dynamic (selected by current data for some fields), but you do have to pre-define them before they can be used. >some code which will fire some query in the database and based upon these values which I get will populate the dropdown2 That's where add-ons apply - you will need to find or write an add-on to do that. You're asking JIRA to retrieve a set of values and then store what the user selects, with no previous knowledge of that data. I'd take a look at the database fields available in the marketplace first, but I'm pretty sure you're going to have to write something.

Suggest an answer

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

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

34 views 0 2
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