Failure in Script Listeners

We are testing out the new version of Adaptavist ScriptRunner for JIRA.

We have been using ScriptRunner version 3.1.4 without issues in our Script Listeners.

During testing of the new plugin I have found 5 of our Script Listeners that have failed.

I need assistance to fix these 5 Script Listeners before I can submit to my management a purchase order for the new version of the ScriptRunner plugin.

Failure 1
issue.labels.any{it.label=='Transfer'} &&
(issue.isSubTask() && issue.parentObject.subTaskObjects.every { it.resolution })
Static Type checking warnings found

Failure 2
issue.status?.name == 'Open' &&
issue.assignee?.name != null && changeItems.any {
Static Type checking warnings found

Failure 3
issue.labels.any{it.label=='NewHire'} &&
(issue.isSubTask() && issue.parentObject.subTaskObjects.every { it.resolution })
Static Type checking warnings found

Failure 4
currentUser == "sendppomitchell"
Cannot get property 'name' on null object

Failure 5
currentUser == "datapulljob12"
Cannot get property 'name' on null object


JIRA Version 6.4.13
Adaptavist ScriptRunner for JIRA Version:


3 answers

1 accepted

The warnings are just warnings about deprecations - see

I don't know what the errors are from, that's what I need the larger screenshot of.


Good morning,

Is there any update to the last items I posted to help resolve this issue?

In those screenshots there are just warnings of deprecated methods, I don't see anything that will prevent it working.

Can you post a screenshot of the ones with errors?

Here are the errors of the ones I can select Preview.



Has these screen shots provided enough information to help create a fix?

Without having these items fixed, I cannot proceed to purchase this plugin.

I suspect Preview is not working for event listeners. It cannot generate an event. If you save that, it should work.

I have tried to save these multiple times, however everyone of these items never function properly. I am still unable to get these working with the new version of the plugin.

Perhaps it is event.user rather than currentUser, although I would expect what you have never to have worked, as currentUser was never ever a string.

I think you want:

event.user?.name == "mitchell"



I am trying to base the condition on who the report of the issue is.

I tried currentUser, event.user and issue.reporter. Neither one of these work.

ERROR 770x77510x1 15dacr8 /rest/scriptrunner-jira/latest/listeners/com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail/preview [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Cannot get property 'name' on null object
java.lang.NullPointerException: Cannot get property 'name' 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 groovy.tmp.templates.GStringTemplateScript79$_getTemplate_closure1.doCall(GStringTemplateScript79.groovy:2)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.groovy.reflection.CachedMethod.invoke(


I said try event.user?.name, or,

As mentioned, I think the preview functionality is not working for events.

Changing the item to == "sendppomitchell" worked for both of the Reporter listeners.

Thank you.

Any idea as to why the listeners (2) for monitoring the Closed status of Sub-tasks aren't working?

(This sends an email when all of the sub-tasks are at a closed status)

issue.labels.any{it.label=='NewHire'} &&
(issue.isSubTask() && issue.parentObject.subTaskObjects.every { it.resolution })

No, seems correct. I would ask a different question, you will get more views.

For the first one, can you add a screenshot with more context please?


Here is most of the content

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...

475 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