I'm trying to use a custom field to validate a Workflow Post Function, but it's not working, does anyone know what I'm missing?
((Map) issue.fields.customfield_10084)?.value == 'Value'
You can't reference the values of a custom field this way. Try this script:
import com.atlassian.jira.component.ComponentAccessordef cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(10084)issue.getCustomFieldValue(cf) == 'Value'
My jira is the clound version, I believe that I can not import anything
Sorry - wasn't paying attention. I usually work in the Server version. Try this:
issue.fields[10084] == 'Value'
No success, follow the error:
[Static type checking] - Cannot find matching method sr.json.issue.fields#getAt(int). Please check if the declared type is right and if the method exists. @ line 1, column 1.
It looks like you're new here. Sign in or register to get started.