Remove user group from a project role for all projects

We have a user group that we initially set up as a default memeber to a specific project role. Every project that uses this role now has the user group associated with the project.

We have now removed the user group from the project role, so any new projects being created will not have the user group associated with it.

Is there a way to remove the user group from the project role in all the existing projects in bulk?

1 answer

1 accepted

You can do this with a Jelly script:

   <core:invokeStatic className="com.atlassian.jira.ComponentManager" method="getInstance" var="componentManager"/>
   <core:invoke on="${componentManager}" method="getProjectManager" var="projectManager"/>
   <core:invoke on="${projectManager}" method="getProjectObjects" var="projects"/>
   <core:forEach var="project" items="${projects}">
      <log:warn>Removing group 'jira-users' from role ID:10000 from project key: ${project.key}</log:warn>
      <jira:RemoveActorsFromProjectRole projectroleid="10000" actors="jira-users" projectkey="${project.key}" actortype="atlassian-group-role-actor"/>

Thank you George.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,958 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot