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 IssueComponentAccessor.commentManager.create(issue, transitionUser, commentText, true);
It looks like you're new here. Sign in or register to get started.