Hi Teams,
I am trying to put a validation where a reporter needed to be in the role of say "Business Nominee" to be able to create an issue. I have try the following code but it is not working:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
projectRoleManager.isUserInProjectRole(issue.reporter?.name, "Business Nominee")
Could I have some support?
Thank you in advance.
Best regards,
Jason Li