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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

93 views 0 1
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