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?
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.