I need to give permission to jira users group for a project issue when the workflow moved from a X to Y transition. Please suggest how can we acheive this jira with script runner or any other ways.
Hello @fazul
You can create Scriptrunner simple script condition on given transition with code like this
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(currentUser.name, 'yourgroup-users')
Hi @Mark Markov i got below error while adding it in post function script condition
<span class="deprecationComment">Use one of the other
<code>isUserInGroup</code> methods that takes a concrete user object instead.
Since v6.4.8.</span> @line 3, column1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops, like this
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(currentUser, 'yourgroup-users')
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.