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

0 vote

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
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 yesterday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

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