I'm currently using the following script as a validator
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(issue.reporter?.name, 'Group1') || groupManager.isUserInGroup(issue.reporter?.name, 'Group2') || groupManager.isUserInGroup(issue.reporter?.name,'Group3')
And I'm getting that warning message. What should I change? Can't find the documentation for it.
Instead of groupManager.isUserInGroup(issue.reporter?.name,'Group3') try groupManager.isUserInGroup(reporter,'Group3')
You may be asked to include def reporter = issue.getReporter() first.
I think some parenthesis between the first definition and the end, so you delimit the expression
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
(groupManager.isUserInGroup(issue.reporter?.name, 'Group1') || groupManager.isUserInGroup(issue.reporter?.name, 'Group2') || groupManager.isUserInGroup(issue.reporter?.name,'Group3'))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.