Hi would like to know how to mention reporter in the comment in the post function custom script in workflow transition
import com.atlassian.jira.component.ComponentAccessor
// Get the Reporter of the Issue
final reporter = issue.reporterUser;
// Set the user that will post the comment to the issue (in this case
// it is the user that transitioned the issue)
def transitionUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser;
// Create your comment text and reference the reporter user.
final String commentText = """This is a comment [~${reporter.getName()}]""";
// Finally post the comment to Issue
ComponentAccessor.commentManager.create(issue, transitionUser, commentText, true);
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.