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