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

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

This widget could not be displayed.

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

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

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 10 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

32 views 1 0
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