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 votes

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
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

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