Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,308
Community Members
 
Community Events
184
Community Groups

Bitbucket detecting permission change with ScripRunner

Hi all,

I'm a totally newbie in the use of ScriptRunner and Groovy. Here is what I need to do: detect any modification (add, modify, delete) in the permissions for any project, and send a mail to a specific address when a modification is detected, including :

  • project key,
  • current user name (the one who makes the modification),
  • new permission (if any),
  • old permission (if any),
  • affected user name

 

I'm quite sure this is possible using kind of ProjectPermissionModifiedEvent event but I'm not able to define the needed script(s) by myself.

 

Any help is welcome

1 answer

1 accepted

Hi Bertrand

Yes, 'ProjectPermissionModifiedEvent' is the correct event type.

We have updated our documentation page with an example for project permission modifications :

https://docs.adaptavist.com/sr4bib/latest/features/listeners/built-in-listeners/send-custom-email-on-event

You can access the event info you need as :

  • Affected user name : event.affectedUser.displayName
  • User who changed the permission : event.user.displayName
  • Project key : event.project.key
  • Previous project permission : event.oldValue
  • New project permission : event.newValue

Please let us know if you'd like further help!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events