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?
Your script looks correct, did you verify the IDs of the fields?
def priorityField = getFieldById(getFieldChanged())
def status = priorityField.getValue()
def priorityReason = getFieldById("customfield_12345")
if (status == "Blocker") {
priorityReason.setRequired(true)
priorityReason.setHelpText("Please provide a reason behind the blocker")
} else {
priorityReason.setRequired(false)
priorityReason.setHelpText("")
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.