Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add script in scriptrunner plugin in Jira for access for a group in transition

fazul July 26, 2018

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.

1 answer

1 accepted

0 votes
Answer accepted
Mark Markov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2018

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')
fazul July 26, 2018

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

Mark Markov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2018

Oops, like this

import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(currentUser, 'yourgroup-users')
fazul July 26, 2018

No errors but .. No use... its not shwoing the issue to user who is in Jira

Suggest an answer

Log in or Sign up to answer