The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

JIRA Script Runner : Get group information when a used to added to it.

Shivashankar Boloor Prakash
March 8, 2018

Hi,

Im trying update a user property when an user is added to any group.

Im using "Events: GroupMembershipCreatedEvent" to trigger when ever a user is added. 

Is there a way to find out to which group the user was added to that triggered GroupMembershipCreatedEvent? Im new to JIRA and script runner development environment. Any suggestion in the right direction will be very helpful. 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Joshua Yamdogo @ Adaptavist
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 Champions.
March 12, 2018

Hi Shivashankar,

According to https://docs.atlassian.com/atlassian-crowd/3.1.1/com/atlassian/crowd/event/group/GroupMembershipsCreatedEvent.html

You can simply call getGroupName() on the event to get the name of group within the event.

Regards,

Josh

TAGS
AUG Leaders

Atlassian Community Events