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,560,360
Community Members
 
Community Events
185
Community Groups

how to validate a users in a particular group in jira using groovy

Hi all, we have 5 users in Jira-admins group so we don't want add any add any other user to that group, if any user accidentally added to that group then an eamil has to be sent to me or my manager ...

5 comments

Hi Pantham,

Everything you need to create a script like that is here (listing users in a given group), and here (sending e-mails using groovy). Based on this, you can create a script that does what you need. It could be a scripted service that runs the script periodically, ScriptRunner allows for this.

I encourage you all to follow my Groovy for Jira Blog.

Hi @Mentorship4Utnq for quick response but  the answer is not suitable for me becoz we don't want add a new user to admin group bt in that link the user want add a users to another group.

Ismael Jimoh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 14, 2021

@Pantham Akhil there is no way to stop your administrators adding users to a specific group. 

As such, the first thing is to do here is to make sure that the administrator group is not set as a default user group users can be added into.

Next, as suggested by @Mentorship4U build a script whenever a new user is added to the group so you can see and validate if it is indeed needed. You can then go to the audit log page to confirm who added the said user to the group and confirm why as well.

Unfortunately, there is no way to directly stop an administrator from adding a new user to a group.

You can consider raising a feature request at https://jira.atlassian.com (do check if such a feature request exists first before raising a new one and vote for existing ones.)
Regards.

Hi @Ismael Jimoh tnq for the response we don't want to stop admins to stop adding users to that group the admin accidentally add any new user to jira-admins group then one email needs to be sent to an admin either me r others. so the script needs to compare the hard codded list of admins and new list everyday and if there is any new user added then it needs to be notified by sending an email. This is what my exact requirement. can you please help me in this . tnq

Regards,

Akhil

Ismael Jimoh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 15, 2021

Hi @Pantham Akhil 

Are you asking for us to write the script for you? From my understanding of your prior comment you said you wanted a notification before the user is added which as I explained isn’t possible.

Please clarify what help you need exactly.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events