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(NullObject.java:57)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:168)
	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
	at com.onresolve.scriptrunner.canned.jira.admin.EscalationService$_runService_closure3.doCall(EscalationService.groovy:355)  <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43)
  • 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 Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

335 views 0 1
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