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?