Forums

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

Add users to group on create

Kevin Decker August 6, 2019

I'm in the process of building out a new JSD project that has some unique requirements to it. What we are looking to do is specify that when a user e-mails the JSD project that they get added to a group because this set of users should only have access to only this project on the portal. We're able to restrict visibility to certain groups by using Devinti's Extension for JSD but not too sure how to have users added to a group on create. Any help or ideas would be appreciated!

1 answer

0 votes
Yury Lubanets
Contributor
August 8, 2019

Hello @Kevin Decker 

If a user emailed the JSD project is a reporter (in report field) you can try the following

Adds a post function on the Create action with the script

import com.atlassian.jira.component.ComponentAccessor

def group = ComponentAccessor.groupManager.getGroup('groupname')
ComponentAccessor.groupManager.addUserToGroup(issue.reporter, group)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events