Is there a way to have two custom fields associated to one another?

I am trying to have a custom field on my issue types, where based on its filled value, another custom field be automatically field.

e.g. If the custom field no.1 is a list of 'Colours', and custom field no.2 is a list of 'Fruits'. Once Red has been selected from 'Colours', then 'Fruits' should automatically be selected as Strawberry.

Is this possible at all?

5 answers

Thanks for the tips everyone!

I don't imagine these options are available for the OnDeman version though, am I correct?

We are using Database Custom Field in download version. I don t know if it s available for OnDemand version. Maybe you can ask the vendor.

Hi there,

I think everyone's suggestions are very good but perhaps a little eager and they have missed you are in onDemand. Unfortunately it means none of them will work.

You could try injecting some javascript into the description of the first field that updates the value of the second field while you are on the edit screen. It's not supported by Atlassian and it doesn't work if the user has disabled javascript or is using a remote API but it might help

Here is an example relating to AoD and injecting JS into the field description

https://confluence.atlassian.com/display/AOD/Creating+Help+for+a+Custom+Field

and some other helpful pages

https://answers.atlassian.com/questions/27160/how-do-you-embed-javascript-for-a-custom-field-in-jira-5-x

https://confluence.atlassian.com/display/JIRACOM/Using+JavaScript+to+Set+Custom+Field+Values

This is brilliant - thanks Matthew!

0 vote
Timothy Chin Community Champion May 28, 2013

The closest solution for this is to have a javascript manipulat the DOM. You can find some examples searching through here.

Hi!!

Maybe you can use Database Custom Field (https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.databasecf) and a auxiliar database table with the relationship between your fields.

Each field queries can be configured to depend on other fields.

So you ll have a table like this:

Color    Fruit
------- --------
Orange   Orange
Red      Strawberry
Yellow   Banana
...      ...

And 2 queries, one for each field like these:

Select Color
from table
Select fruit
from table
where color=customfieldX

Hope this helps.

Thank you Mario! Would I be able to use a Database cutom file on the OnDemand version of JIRA too, or is this only available on the hosted version?

We are using Database Custom Field in download version. I don t know if it s available for OnDemand version. Maybe you can ask the vendor.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

671 views 3 11
Read article

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