I just installed ScriptRunner and am trying to get a very basic Hello World script to run. Failing miserably...
I installed the add-on and copied the sample code for Email Notify on Priority Change.
import groovy.xml.MarkupBuilder def priorityChange = get(issue.self) .queryString('expand', 'changelog') .asObject(Map) .body .changelog .histories .last() .items .find { it['field'] == 'priority' } . . .
This fails right out of the chute because it complains that
[static type checking] - the variable [issue] is undeclared
.
I must be missing something basic here. Any thoughts?
Hi Joseph,
The static type checking is only advisory. It is something we are working on to improve the accuracy of. The script you have there should run just fine when the event fires.
Regards, Jon
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.