Property 'currentUser' not found in custom email?

Hi,

im getting the error message "Property 'currentUser' not found" in the create issue screen after i press the "Create Issue" button.

i added a post function "Send custom email" from the script runner plugin.

While the preview action in the editor sais everything is ok, the real execution of the script in the workflow shows the error "Propery 'currentUser' not found". But the issue is created succesfully.

I am accessing the currentUser in that way:

bla blubb ${currentUser.displayName} more text for the email

 

This is the order of the post functions

image2015-6-22 10:40:36.png

Where is my error?

 

 

2 answers

1 accepted

Well, i can solve this by my self:

in script runner, the currentUser is not an object but a function.

So the correct syntax is:

$currentUser.displayName

 

 

0 vote

I'm a bit confused... I don't see currentUser as being available in the script binding there. I was going to suggest using:

componentManager.jiraAuthenticationContext?.user?.displayName

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 Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

685 views 6 13
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