Get Current User in Script Runner custom email

Hemanshu Sood December 7, 2018

Hi, I am trying to design a custom script runner email as a post function. I need to include current user's name or last person's name who triggered this action. 

How to do that in Script Runner Email body?

I have tried:

${currentUser.displayName} but it does not work in email

 

Please help

 

2 answers

1 vote
Manuel Bähnisch August 2, 2021

Hi Hermanshu,

even though its been almost three years ago I thought I'd reply anyway. I was searching for the same and found the following solution:

<% out << com.atlassian.jira.component.ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getDisplayName()%>

 

Cheers, Manuel.

0 votes
Hemanshu Sood December 10, 2018

Hi All, any updates would be helpful

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events