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.
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.