Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Workaround for renaming groups in Crowd using Scriptrunner

Rob Horan
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.
February 6, 2018

Given that it is not possible to rename groups, would it be possible to use ScriptRunner to create a new group and then transfer all properties associated from another group to the new one so that it would essentially be like a rename from the end user's perspective?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Craig Castle-Mead
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.
February 19, 2018

Hey Robert,

I think it depends on what "all properties" means in your environment. If you know that Groups are only used in Permission Schemes and Roles, then you'd likely be able to loop through all permission schemes and all roles and replace $oldGroupName with $newGroupName - unfortunately things often aren't that simple as groups in Jira are possibly used in many other places (workflow conditions/post functions, notification schemes, add-ons, filter/board perissions to name a few). Given you're using Crowd, you also likely have more than 1 application, so you then need to repeat the same for Confluence (space permissions, user list macros, restrictions), Bitbucket (permissions) etc etc.

While the applications store a users GUID (mapped through from Crowd > AD/LDAP/etc) and understand how to change any flow on impact from a rename, groups are only stored with the groups name as a string as the primary key and foreign key throughout.

Managing a large scale environment, this is a significant frustration as refactoring when we need to change group names is either not done as much as it should be due to the effort involved, or, manually change what we know and have to wait for users to say something is broken and fix up after.

Suggest voting on https://jira.atlassian.com/browse/CWD-1599 to get the support, however even if/when Crowd supports it, every other app that can use Crowd needs to support it as well.

CCM

TAGS
AUG Leaders

Atlassian Community Events