Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

only display one value in single choice list custom field in jira based other customfield value

Martin December 24, 2015

Hello,

Is there any way to limit the single choice list field(field A) value based on other custom field(field B) value.

If the value of field B="1", in field A, there is only "value 1" displayed in the dropdown list.

if the value of field B="2", in field A, there is only "value 2" displayed in the dropdown list.

if the value of field B="2", all the values of field A will be displayed in the dropdown list.

Thanks and Regards

 

1 answer

0 votes
Nic Brough -Adaptavist-
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.
December 24, 2015

Two options

  1.  Use a cascading select list - B as the main field, A as the secondary
  2. Code.  Hack some javascript into JIRA (horrid, ugly, unreliable and a pain to maintain), or find/write an add-on that provides the linked fields, or install Script Runner and use a Behaviour to do it
Martin December 24, 2015

Hello,

I choice option 2, I know I should write JS in field description or behaviour to achieve this function.

But do you have some examples how to only show the special value of customfield in dropdown list in javascript?

 

Thanks and Regards

Nic Brough -Adaptavist-
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.
December 25, 2015

I don't do things with javascript because that way lies madness. I can never recommend it because it always breaks. For Behaviours, start at https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events