The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Property 'currentUser' not found in custom email?

Martin Heinemann
Contributor
June 21, 2015

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Martin Heinemann
Contributor
June 21, 2015

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 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 21, 2015

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