I'm working on a custom email to be sent when an issue uses a specific transition and I have that email setup to contain some custom information.
I can't seem to get the name of the user who actually triggered the transition.
Can anyone help me with configuring this to pull in the user that did the transition?
Thanks in advanced!
Below is the simple script I have created to display in HTML.
<p><strong>Link to issue: </strong><a href = "${baseurl}/browse/${issue.getKey()}">${issue.getKey()}</a></td></tr><br /><strong>User who triggered transition: </strong><span style="color: #0000ff;">USER GOES HERE</span>
<hr />
<p><strong>Summary:</strong> ${issue.summary}<br /><strong>Reporter:</strong> ${issue.reporter.name}<br /><strong>Assignee:</strong> ${issue.assignee.name}<br /><strong>Account: </strong>${issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Account"))}<br /><strong>Description:</strong> ${issue.description}</p>
<hr />
<p>
<% if (mostRecentComment)
out << "<strong>Last comment: </strong>" << mostRecentComment
%>
</p>
Hello @Megan Makowiecka
You can do it like this
<p><strong>Link to issue: </strong><a href = "${baseurl}/browse/${issue.getKey()}">${issue.getKey()}</a></td></tr><br /><strong>User who triggered transition: </strong><span style="color: #0000ff;">${currentUser.getDisplayName()}</span>
<hr />
<p><strong>Summary:</strong> ${issue.summary}<br /><strong>Reporter:</strong> ${issue.reporter.name}<br /><strong>Assignee:</strong> ${issue.assignee.name}<br /><strong>Account: </strong>${issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Account"))}<br /><strong>Description:</strong> ${issue.description}</p>
<hr />
<p>
<% if (mostRecentComment)
out << "<strong>Last comment: </strong>" << mostRecentComment
%>
</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.