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

This widget could not be displayed.

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

203 views 1 3
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