I want to execute the below bahaviour script in my form.There is no error in the script, but it does not work on the form.
Also this shows type error when I copy the code in console tab.I amusing script runner 8.36 version.
Could you please help?
def priorityField = getFieldById(getFieldChanged()) // field this behaviour script is defined on
def status=priorityField.getValue()
def priorityReason =getFieldById("PriorityReason")
if (status == "Blocker") {
priorityReason.setRequired(true)
priorityReason.setHelpText("Please provide reason behind the blocker")
}
else {
priorityReason.setRequired(false)
priorityReason.setHelpText ("")
}