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

Parmiss Manesh May 28, 2013

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

4 votes
Parmiss Manesh May 28, 2013

Thanks for the tips everyone!

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

Mario Prada Arroyo May 28, 2013

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.

1 vote
MatthewC
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.
May 28, 2013

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

Parmiss Manesh May 29, 2013

This is brilliant - thanks Matthew!

0 votes
Mario Prada Arroyo May 28, 2013

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.

Parmiss Manesh May 28, 2013

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?

Mario Prada Arroyo May 28, 2013

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.

0 votes
Timothy
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.
May 28, 2013

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

0 votes
Christian Czaia _Decadis AG_
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.
May 28, 2013

Take a look at Jamies behaviours plugin:

https://jamieechlin.atlassian.net/wiki/display/JBHV/JIRA+Behaviours+Plugin

You'll also find examples...

Suggest an answer

Log in or Sign up to answer