Can't hide a cascading fields based of "customer request type" value

ebrahim rezaian January 8, 2022

def mom_var= getFieldById("customfield_10109").getValue()

if( (mom_var =="it/634ed4a7-315d-4d41-80f1-9f3bf5657791,11100,11405,true"))
{
getFieldByName("Operatin System").setHidden(false)
getFieldByName("Operatin System").setRequired(true)
   
}
else
{
getFieldByName("Operatin System").setHidden(true)
getFieldByName("Operatin System").setRequired(false)    
}

 

 

I had try this with "getfieldByID" but it doesn't work either.

1 answer

0 votes
Vishwas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2022

Hey @ebrahim rezaian 

You have mentioned Jira Cloud, and this piece of code you are trying to add in Behaviors ? 

is this if( (mom_var =="it/634ed4a7-315d-4d41-80f1-9f3bf5657791,11100,11405,true")) all one value you are trying to compare or multiple values ?

Regards,

Vishwas

ebrahim rezaian January 8, 2022

yes
it is the only value
it works with other type of fields except cascading fields.

ebrahim rezaian January 8, 2022

and I'm sorry 
I'm working on jira server 
@Vishwas 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events