Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get a field to be hidden or not hidden depending on the selection of a Custom Field

Davide Cascapera
Contributor
October 31, 2022

Hi all,

this is my behavior and I don't know why dosent work:

 

def field1 = getFieldById("customField_20600")

def field2 = getFieldById("customField_10001")

def fieldValue = field2.value()

   if( fieldValue == "my chooise"){

field1.setHidden(false)

} else {

field1.setHidden (true)

}

       When in the issue I compile field2 with my choose,  field1 remain in hide

 

thx in advance for your time                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

 

 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Claudio Ombrella
Contributor
January 24, 2018

When do you run the script? Before or after changing the status? I suspect that your triggering the script before the workflow transition step. Put a screenshot here so we can give a look. 

TAGS
AUG Leaders

Atlassian Community Events