script runner - nullpointerexception - escalation service

Defined a very simple escalation service


Description: xyz
Interval : 1 
JQL: issuetype = Document and 'To approve' is empty and 'Has declined' is empty and 'Has accepted' is not empty and status = sent
Actions: autoApprove
Run as: automation
No additional code

The logging barfs 

2014-09-25 00:40:01,232 atlassian-scheduler-quartz1.local_Worker-1 ERROR idalko     [atlassian.scheduler.core.JobLauncher] Scheduled job with ID 'JiraPluginScheduler:com.onresolve.scriptrunner.canned.jira.admin.EscalationService:job' failed
java.lang.NullPointerException: Cannot get property 'statusObject' on null object
	at org.codehaus.groovy.runtime.NullObject.getProperty(
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(
	at com.onresolve.scriptrunner.canned.jira.admin.EscalationService$_runService_closure3.doCall(EscalationService.groovy:355)  <+3> ( (
  • The jql runs fine when run in a search
  • automation has admin access to the project
  • This was working fine on a pre 3.0 version of the script runner ?



1 answer

Looks like you can get an NPE if the transition failed. I'll add some code to deal with that.

Was there anything in the logs before that indicating as much?

The transition is 'hidden' for normal users - so this might be the reason. There was nothing in the log.

There is a known bug in JMWE if that is what you are using to hide the transition.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

457 views 8 27
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you