How to rename a group in Jira
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products will end after February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications. However, see Renaming of Group in the Cloud for the feature available here.
An administrator may need to rename a Jira group to reflect changes their organization undergoes. This is currently not possible to do in Jira, but a feature request is under consideration: - JRASERVER-1391Getting issue details... STATUS
However, we can manually change a group name and all the permissions related to it through the database.
Bear in mind that such procedure is not part of Jira's intended functionality. As such, this process is not covered under the Atlassian Support Offerings and the information given here is provided as-is. It should be thoroughly tested in a development or staging environment before implementing any changes in your production instance.
Before you begin
- Apps: This procedure won’t update the group names in apps, as this data isn’t stored in Jira’s database tables. You have to make the changes manually in each app.
- Jira Software/Service Management: Also, it will update the group names in the Jira platform, which is shared between Jira Core, Jira Software, and Jira Service Management (the latter two are built on top of the platform). It might happen that group names are also stored in places specific to Jira Software or Jira Service Management, and these won’t be updated.
- Jira will need to be restarted, ensure to test and plan a maintenance window.
You can rename the group by running SQL statements against the Jira database. Replace the
<OLD_GROUP_NAME> with the actual names of your groups.
The below steps assume you're renaming groups within the same User Directory.
If you're changing User Directories and want to replace the references to one group for another, skip steps 1, 2.1 and 2.2. Nested groups from the LDAP to Jira internal directory should then be configured manually.
1. Rename the group
update cwd_group set group_name = '<NEW_GROUP_NAME>' , lower_group_name = '<NEW_GROUP_NAME_LOWERCASE>' where group_name = '<OLD_GROUP_NAME>' and group_type = 'GROUP';
2. Update the group name in all entities that are using it
update cwd_membership set parent_name = '<NEW_GROUP_NAME>' , lower_parent_name = '<NEW_GROUP_NAME_LOWERCASE>' where parent_name = '<OLD_GROUP_NAME>' and membership_type = 'GROUP_USER';
update cwd_membership set child_name = '<NEW_GROUP_NAME>' , lower_child_name = '<NEW_GROUP_NAME_LOWERCASE>' , child_id = <NEW_GROUP_ID> where child_name = '<OLD_GROUP_NAME>' and membership_type = 'GROUP_GROUP';
update notification set notif_parameter = '<NEW_GROUP_NAME>' where notif_parameter = '<OLD_GROUP_NAME>' and notif_type = 'Group_Dropdown';
update schemeissuesecurities set sec_parameter = '<NEW_GROUP_NAME>' where sec_parameter = '<OLD_GROUP_NAME>' and sec_type = 'group';
update schemepermissions set perm_parameter = '<NEW_GROUP_NAME>' where perm_parameter = '<OLD_GROUP_NAME>' and perm_type = 'group';
update sharepermissions set param1 = '<NEW_GROUP_NAME>' where param1 = '<OLD_GROUP_NAME>' and sharetype = 'group';
Note: Updating shared edit rights is required only for Jira 7.12, or later. Earlier versions don't allow to share edit rights for filters and dashboards.
update filtersubscription set groupname = '<NEW_GROUP_NAME>' where groupname = '<OLD_GROUP_NAME>';
update jiraaction set actionlevel = '<NEW_GROUP_NAME>' where actionlevel = '<OLD_GROUP_NAME>';
update worklog set grouplevel = '<NEW_GROUP_NAME>' where grouplevel = '<OLD_GROUP_NAME>';
update searchrequest set groupname = '<NEW_GROUP_NAME>' where groupname = '<OLD_GROUP_NAME>';
update projectroleactor set roletypeparameter = '<NEW_GROUP_NAME>' where roletypeparameter = '<OLD_GROUP_NAME>' and roletype = 'atlassian-group-role-actor';
update globalpermissionentry set group_id = '<NEW_GROUP_NAME>' where group_id = '<OLD_GROUP_NAME>';
update licenserolesgroup set group_id = '<NEW_GROUP_NAME_LOWERCASE>' where group_id = '<OLD_GROUP_NAME_LOWERCASE>';
update customfieldvalue set stringvalue = '<NEW_GROUP_NAME>' where stringvalue = '<OLD_GROUP_NAME>' and customfield in ( select id from customfield where customfieldtypekey in ( 'com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker' , 'com.atlassian.jira.plugin.system.customfieldtypes:grouppicker' ) );
3. Find filters and workflows that contain group names
Group names can also be used in filters and workflows, but just changing them with SQL statements would be too risky and could result in errors. You can run the following queries to get a list of filters and workflows that contain your group names, and then edit them in Jira.
select filtername , reqcontent from searchrequest where reqcontent like '%<OLD_GROUP_NAME>%';
After you get a list of filters, go to Issues > Manage filters. Group names will usually be listed in the filter’s JQL query.
select workflowname from jiraworkflows where descriptor like '%<OLD_GROUP_NAME>%';
After you get a list of workflows, go to> Issues > Workflows. Group names might be in the workflow’s conditions, but you need to check other details, too.