How to hide the other custom field based on the options selected in cascade select list field using behaviour?

We have 2 fields A, B.

A- cascading select list. (options :a:1, a:2)

B- text field.

If i choose a:1 the field B should be hidden.

We use behaviour plugin for this but it is not working.

def A= getFieldByName("A")

def B= getFieldByName("B")

log.debug("A" + A.getValue())

if (A.getValue() == ["a":"1"])

{

B.setHidden(true);

}
else
{
B.setHidden(false);

}

Please let us know how to achieve it.

1 answer

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

299 views 0 12
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot