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:

<JiraJelly
   xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
   xmlns:core="jelly:core"
   xmlns:log="jelly:log">
 
   <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"/>
   </core:forEach>
</JiraJelly>

Thank you George.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

158 views 1 17
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