Hi,
I have problem with showing and hiding fields using ScriptRunner. I checked different posts here and saw different solutions but it seems like nothing works for me. Costumer portal simply don't behave like I would wont to.
When customer choose 'Duplikat', second field 'Datum predvidenega vračila' should became visible. Otherwise it stays hidden.
Please help. What am I doing wrong.
Code:
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
def cascadingField = getFieldById(getFieldChanged())
String cascadingValues = cascadingField.getValue()
def Datum = getFieldById("customfield_12629") //Datum predvidenega vračila
Datum.setHidden(true)
if (cascadingValues == "Duplikat") {
Datum.setHidden(true)
}
else
{
Datum.setHidden(false)
}