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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.