Remove user group from a project role for all projects

JT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2012

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

0 votes
Answer accepted
George Lewe (LSY)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2012

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>

JT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Thank you George.

Suggest an answer

Log in or Sign up to answer