Hide/ Show Dropdown Values conditionally using Script Behaviours in JIRA Cloud

Ganesh Kumar Vary November 27, 2023

Hi All,

I am trying to use Script Behaviours to hide field values of a single select custom field in JIRA Cloud depending of values of other custom field.

_________________________________________________________________________________________

I am using the below Script:

const field1 = getFieldById("customfield_xxxx")
const field2 = getFieldById("customfield_xxxy")

if (field2.getValue().value == 'Commercial')
{
field1.setOptionsVisibility(["1","2", "3", "4"], true);
}
else
{
field1.setOptionsVisibility(["5","6"], true);
}

_________________________________________________________________________________________

There are no errors in the script but somehow not working as expected. May I know any thing that I am doing wrong.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events