Sorry still new to behaviours so please forgive this ignorance which hopefully might be an easy question.
We are currently on JIRA 6.3.1 using ScriptRunner 4.1.3.9.
Specifically the issue is I have a behaviour created upon a custom field.
For that specific field I am trying to detect when there is a change.for this field and the "Fix Version/s" is not set throw an error that prevents the user from updating.
Currently I have the below where the specific field is customfield_10038.
Is there something obvious that I am doing wrong or misunderstanding?
def field = getFieldById(getFieldChanged())
if (field == "customfield_10038" && fixVersion.getValue() == "") {
field.setError("You aren't allowed to checkin.")
}
else {
field.clearError()
}
Thanks in advance.