Fire Custom Email when User is:


(disclosure:  I'm very new to scripting, I took a C++ class about 8 years ago)


I'm trying to fire a custom email via scriptrunner when the reporter is "Remote User".  What script would i use for this?


I cobbled together a condition script :

import com.atlassian.jira.component.ComponentAccessor

def userManager = ComponentAccessor.getUserManager()
issue.reporter == "Remote User"


But it always resolves as false, so i must be doing something very wrong.


Thank you

3 answers

1 vote

I think you just want: == "username"

for the condition. If you want to compare the full name, which is not really advisable, you could use:

currentUser.displayName == "Mr. A User"

Hi Jared,

How about you try using this script in your condition

import com.atlassian.jira.ComponentManager
def username = ComponentManager.instance.userUtil.getUserObject("jirausername")
issue.reporter == "username"


Hi Jamie,

Both suggestions return "Cannot get property 'name'(or displayName) on null object"

Hi Taha,

Returns a "The condition evaluated to false"

Thank you for the suggestions!!!


Would it be possible to have a condition that evaluates to true if a custom field has changed?  The field in question will only ever have a value if the email sender does not have a JIRA account.

I'm not sure what the context of your question is, can you attach a screen-cap showing the configuration.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

787 views 5 7
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