Hi @Jason Whitaker ,
You are reffering for Jira Service Desk Server, right?
Assuming your answer will be "yes".
Here is the code of how to do it:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
def commentManager = ComponentAccessor.getCommentManager()
def comments = commentManager.getComments(event.issue)
def author = comments.last().authorApplicationUser
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager.class)
def role = projectRoleManager.getProjectRole("Service Desk Customers")
if (projectRoleManager.isUserInProjectRole(author, role, event.issue.getProjectObject())) {
//Gets here if the author of the comment is customer
//Write here what you want to do
}
I tested it, and it work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.