We are trying to view/hide a text field based on the value of the JIRA Flagged field. We have the following script set up:
def reasonForBlock = getFieldById("customfield_16560")
def flaggedField = getFieldById(getFieldChanged())
def selectedOption = flaggedField.getValue() as String
def isImpedimentSelected = selectedOption == "Impediment"
reasonForBlock.setHidden(! isImpedimentSelected)
We have applied this to the Flagged field (a checkbox field)
Expected results - the text field would remain hidden until the Flagged field was set
Actual results - the text field is not visable when the Flagged field is set