Issue Details (XML | Word | Printable)

Key: JRA-1391
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Alwyn Schoeman
Votes: 138
Watchers: 61
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

Renaming groups after creation.

Created: 03/Mar/03 04:23 AM   Updated: Thursday 06:10 AM
Component/s: User Management
Affects Version/s: 2.0
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Part
 
Reference
 

Participants: Adam Cameron, Alvaro Alonso, Alwyn Schoeman, Ann-Sophie HOCQ, Arpad P., Didier Pieroux, Drakk, Frank Stiller, Ganesh Chattanath, Gerd Gueldenast, Jean-Baptiste Catté [SunGard], Jeff Turner [Atlassian], Lauri Siljam?ki, mizuho, Neal Applebaum, Oliver Wihler, Russ Young, Shirley Keddy, Stefan Bley and Sulka Haro
Since last comment: 7 weeks, 5 days ago
Labels:
Support reference count: 10


 Description  « Hide
The ability to rename a group after creation. Changes would then be valid throughout all projects...

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Alwyn Schoeman added a comment - 19/Jun/03 01:04 AM
Linking the two identical issues. I say duplicated by even though date
order is otherway around as the other issue have no description.

Arpad P. added a comment - 11/Jul/03 05:08 PM
Yes, please allow renaming groups. On a site already running JIRA and having lots of groups/projects it is difficult/impossible to create the new - correct - group name, go through all the permission and notification schemes and switch the old name to the new one and then delete the old one. If only one can simply rename a group...

Lauri Siljam?ki added a comment - 28/May/04 01:44 AM
Please fix this, as this creates problems with user management. JRA-3494 describes the cause for this not being fixed yet.

Sulka Haro added a comment - 30/Dec/04 04:50 AM
Please fix this asap. We're using the Jira & Confluence shared user ID's which puts pressure into adding more groups into the system - we currently have 55 groups, half of which should be renamed for clarity.

Jeff Turner [Atlassian] added a comment - 30/Dec/04 06:47 AM
This is certainly something we need to fix. The hacky workaround is to create an XML backup, and do a search & replace of '"<groupname>"', and import the modified XML.

Sulka Haro added a comment - 30/Dec/04 06:53 AM
How about this interim solution: make an "upgrade task" that renames the groups during startup and create a way for the administrators to somehow specify which groups should be renamed? The XML trick is tough one since a group name is actually quite likely to match some content in issue descriptions...

Jeff Turner [Atlassian] added a comment - 30/Dec/04 06:57 AM
A proper fix would be not much more effort than any interim hack. For the search & replace, if you include the quotes, s/"<groupname>"/"<newgroupname>"/g, that would avoid matching mentions in comments.

Alvaro Alonso added a comment - 31/Jan/06 09:38 AM
Hi,

Rename of group is a MUST for Jira.

Changing group name is a feature you have in Windows, Netware, email servers, etc.

Alvaro Alonso
Bogota, Colombia (South America)


Ann-Sophie HOCQ added a comment - 07/Aug/06 09:40 AM
Hi,

We need this functionnality because of workflow reorganisation.
Please fix it.

Thanks


Shirley Keddy added a comment - 14/Sep/06 02:31 PM
Yes, being able to change a group's name would make life in the fast lane much easier! (And we all live there - right?!)

Didier Pieroux added a comment - 29/Sep/06 03:08 AM
Hi,

Somehow two diffferent groups have been created with the SAME group name (shouldn't that be checked and forbidden at first ?). Now, when assigning groups to users, we have two entries that look identical but correspond in fact to these two different groups. As expected, people often choose the wrong entry.

As they are different, the easy solution is to rename one of them. So please, fix it.

Thanks.

Ps: This feature has been request for almost 4 years... Is it that hard to implement ? How is it that today, people are still writing applications for which you can't edit dumb strings like a group name... ?


Adam Cameron added a comment - 29/Sep/06 03:42 AM
I too am surprise this issue's been lurking around for so long. How hard can it be? It's just adding a form field to the group-edit screen, isn't it?

Neal Applebaum added a comment - 29/Sep/06 08:15 AM
First, I think it was some design oversight by Atlassian in using group names instead of ID's in all the foreign key relationships. Hard to understand since the rest of JIRA uses ID's (except for usernames). So, that's probably why it's not an easy fix. Second - regarding the duplicate group names - can you query the database directly? Is it perhaps a case sensitivity issue or a trailing space or something?

Jean-Baptiste Catté [SunGard] added a comment - 29/Sep/06 08:53 AM
Use goups as an id was a mistake, but perhaps it can be fixed by adding a "label".
Users would be only aware of the label, but internaly the old name/id would be used.

Frank Stiller added a comment - 03/Jan/07 05:06 AM
I am currently at the edge of setting up a new clearly defined new System with a database of more then one year. So i have quite some groups to rename. I could not yet find any help in renaming groups in JIRA, not even as SQL-Script.

So i am currently digging around and maybe someone can help me to find something in this direction. I have created a table with oldgroupname and newgroupname which i called tab_groupmigration.

This SQL-Script looks good as i restarted my 3.7 testinstance on mysql:

update membershipbase x inner join tab_groupmigration z on
x.GROUP_NAME = z.oldgroupname
set GROUP_NAME = z.newgroupname

update schemepermissions x inner join tab_groupmigration z on
x.perm_parameter = z.oldgroupname
set perm_parameter = z.newgroupname

I would be nice i someone could state that i did not forget any relevant field.

p.s. i am aware of that the same field exists for the notification scheme table. Maybe i will comment later on again (if no one replies ).


Frank Stiller added a comment - 03/Jan/07 06:58 AM
After digging a bit deaper i have the following solution for me (so far):
  1. Shut down JIRA
  2. Run the following SQL-Script:
    update membershipbase x inner join tab_groupmigration z on
    x.GROUP_NAME = z.oldgroupname
    set GROUP_NAME = z.newgroupname;
    
    update schemepermissions x inner join tab_groupmigration z on
    x.perm_parameter = z.oldgroupname
    set perm_parameter = z.newgroupname
    where perm_type = 'group';
    
    update notification x inner join tab_groupmigration z on
    x.notif_parameter = z.oldgroupname
    set notif_parameter = z.newgroupname
    where notif_type = 'Group_Dropdown';
    
    update schemeissuesecurities x inner join tab_groupmigration z on
    x.sec_parameter = z.oldgroupname
    set sec_parameter = z.newgroupname
    where sec_type = 'group';
    
    update searchrequest x inner join tab_groupmigration z on
    x.groupname = z.oldgroupname
    set groupname = z.newgroupname;
    
    update filtersubscription x inner join tab_groupmigration z on
    x.groupname = z.oldgroupname
    set groupname = z.newgroupname;
  3. Start up JIRA again

I would appriciate any confirmation to this or other hints to this
cheers
Frank


Neal Applebaum added a comment - 03/Jan/07 09:14 AM
Frank, here's a little script I wrote to find columns of a certain name (not just for JIRA, but in my work):

select obj.name+ '.' +col.name from syscolumns col, sysobjects obj
where col.name like '%group%' and col.id=obj.id order by obj.name,col.name

It found this:

changeitem.groupid, filtersubscription.groupname, groupbase.groupname, jiraperms.groupname,
membershipbase.GROUP_NAME, qrtz_job_details.JOB_GROUP, qrtz_triggers.TRIGGER_GROUP,
searchrequest.groupname, sysfilegroups.groupid, sysfilegroups.groupname, sysfiles.groupid,
sysindexes.groupid, sysmembers.groupuid, sysusers.isntgroup

It's not 100% complete in finding the columns you need (the name of the column is all that's checked), but it can be helpful. I would also check that the viewable by Group for comments is included in your search. In the XML it looks like this:
<Action id="12170" issue="11160" author="jonhd" type="comment" level="groupname"
e.g. select * from jira.jiraaction where actiontype='comment' and actionlevel is not NULL


Frank Stiller added a comment - 03/Jan/07 09:38 AM
Thanks Neal.

Of course i forgot the most important Table groupbase. And the good hint to the jiraaction-table ended in these 2 additional SQL-Statements:

update groupbase x inner join tab_groupmigration z on
x.groupname = z.oldgroupname
set groupname = z.newgroupname;

update jiraaction x inner join tab_groupmigration z on
x.actionlevel = z.oldgroupname
set actionlevel = z.newgroupname;

I dont think the rest must be modified. The Parameter-Columns are not in your resultset as they didnt contain the group in its name, but i think it is quite a good base to work with now.


Gerd Gueldenast added a comment - 08/Feb/07 11:38 AM
Is that issue really that complicated to do?

It seems to be a fairly basic requirement, which is really helpful.


Oliver Wihler added a comment - 19/Jul/07 07:29 AM
we have just defined naming conventions for our hundreds of groups...

please please implement this feature.


Frank Stiller added a comment - 14/Aug/07 04:29 AM
I just renamed some groups in JIRA 3.10, with the following SQL-Code (for MySQL) i did not find any old groupnames in the extracted XML:
update groupbase x inner join tab_groupmigration z on
x.groupname = z.oldgroupname
set groupname = z.newgroupname;

update membershipbase x inner join tab_groupmigration z on
x.GROUP_NAME = z.oldgroupname
set GROUP_NAME = z.newgroupname;

update schemepermissions x inner join tab_groupmigration z on
x.perm_parameter = z.oldgroupname
set perm_parameter = z.newgroupname
where perm_type = 'group';

update notification x inner join tab_groupmigration z on
x.notif_parameter = z.oldgroupname
set notif_parameter = z.newgroupname
where notif_type = 'Group_Dropdown';

update schemeissuesecurities x inner join tab_groupmigration z on
x.sec_parameter = z.oldgroupname
set sec_parameter = z.newgroupname
where sec_type = 'group';

update searchrequest x inner join tab_groupmigration z on
x.groupname = z.oldgroupname
set groupname = z.newgroupname;

update filtersubscription x inner join tab_groupmigration z on
x.groupname = z.oldgroupname
set groupname = z.newgroupname;

update jiraaction x inner join tab_groupmigration z on
x.actionlevel = z.oldgroupname
set actionlevel = z.newgroupname;

update worklog x inner join tab_groupmigration z on
x.grouplevel = z.oldgroupname
set grouplevel = z.newgroupname;

update projectroleactor x inner join tab_groupmigration z on
x.roletypeparameter = z.oldgroupname
set roletypeparameter = z.newgroupname
where roletype = 'atlassian-group-role-actor'

it looks stable from my point of view.


Drakk added a comment - 22/Jul/08 02:46 PM - edited
Wow,

100 votes, 5 years later...

Maybe 1 more vote and another 5 years...


Stefan Bley added a comment - 12/Nov/08 09:07 AM
I have added my vote.

Why does it need that long to implement this feature? 5 years in the IT world is like 20 years in real world.


Russ Young added a comment - 10/Dec/08 06:47 PM
This is surprising to me. I had to rename the group. Simple task, right? The most surprising thing is that it has been requested for so long and is still not implemented. How is it that the priority is minor? I tried to rename the group in the database with the assumption that it is referenced by the group ID. Bad idea.

Then I looked on here, found the improvement and voted for it. Then I saw the notes about changing the DB. The script that Neil gives gives an error, something about syscolumns not found. So I tried Franks script and set the new and the old and ran the script and nothing is changed since nothing was found.

Help?

How did this get designed without rename in mind?

Russ


Frank Stiller added a comment - 11/Dec/08 01:16 AM - edited
How did you run the script, did you have a table with the mentioned name (here: tab_groupmigration) and oldvalues which are Groupnames in your groupbase?

Edit: you can test whether your script will have effect while trying something like this:

select * from tab_groupmigration where oldgroupname in (select groupname from groupbase)

To get the changes properly showing up in your Instance you must reindex JIRA and i for sure restart the JIRA-Service as i always have sideeffects with SQL-Scripts and JIRA.


Neal Applebaum added a comment - 11/Dec/08 11:04 AM
Russ - that syscolumns table I mentioned is one that is automatically created in an MS-SQL database. I just used it to help identify potential columns by name. The other scripts would be required that reference JIRA tables.

Russ Young added a comment - 11/Dec/08 03:40 PM
Frank and Neal - Thanks for your help!
Your feedback helped me discover my error. I had not done the insert correctly, so no hits were found. Still new to mysql...
That did the job. Always good advice to do the index afterwards... I set this up as a script file so that next time it will be relatively simple to do. But - I still want this feature to be implemented in Jira!
Russ

Ganesh Chattanath added a comment - 15/Jan/09 10:52 AM - edited
Hello All,

A share filters were not showing up for users on JIRA 3.13.2. On investigation we found that there is one more DB table called 'sharepermission' with a column name PARAM1 that contains old group names.

MS-SQL
update x set x.PARAM1=t.newgroupname from sharepermissions x,tab_groupmigration t where x.PARAM1=t.oldgroupname

Thanks,
Ganesh


mizuho added a comment - 30/Mar/09 01:19 AM
What about the group of settings in workflow?
It can not be updated by this sql script !!!

mizuho added a comment - 11/May/09 12:19 AM
And what about the Filter?
For example search with the group of issue assignee or issue author,
search with the custom filed of Group Picker or Multi Group Picker.