Insight Scripted Validator wont work

Steve Letch July 11, 2019

Here's the script example that Insight provides

 

import com.atlassian.jira.component.ComponentAccessor;import com.atlassian.jira.issue.fields.CustomField; def value = issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObject(10000)); // Change ID to the correct one      /* If an insight custom field has an object called "Microsoft" it will fail */if (value != null && "Microsoft".equals(value[0].getName())) {    return "This is not a valid vendor!";}return true

 

I've modified the script for my field but get the following (even before modifying it)

 

and here's my error

Screenshot 2019-07-11 at 10.23.24.png

1 answer

0 votes
Steve Letch July 11, 2019

nvm sorted it

Suggest an answer

Log in or Sign up to answer