I have a scriptrunner script, and all seems well until the last line:
def Category log = Category.getInstance("com.onresolve.jira.groovy.PostFunction")
def customFieldManager = ComponentAccessor.getCustomFieldManager();
def cf1 = customFieldManager.getCustomFieldObjectsByName("New Hire Account provisioning");
def nhap = cf1.iterator().next();
def nhapvalue = issue.getCustomFieldValue(nhap);
if (nhapvalue == "Egencia")
invalidInputException = new InvalidInputException("Don't forget to provide the full legal name.")
I get the message "[Static type checking] - The variable [invalidInputException] is undeclared." I've used this exact structure in another script, and it works flawlessly; I'm baffled as to why it isn't working here. Any ideas?
If it is a static type error, does it mean that you haven't actually run it yet? Do you mean that you are getting one of the small red crosses in your code?
If so, that could mean that it isn't broken at all. Could you save the script and run it?
Hi Community! The Jira Service Desk marketing team is looking for customers who have successfully switched from Zendesk to Jira Service Desk! We’d love to hear your thoughts on the pros and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs