History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

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

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: 13/Feb/08 03:58 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, Frank Stiller, Gerd Gueldenast, Jean-Baptiste Catté [SunGard], Jeff Turner [Atlassian], Lauri Siljam?ki, Neal Applebaum, Oliver Wihler, Shirley Keddy and Sulka Haro
Since last comment: 38 weeks, 3 days ago
Support reference count: 6
Labels:


 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 - 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. - 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 - 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 - 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] - 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 - 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] - 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 - 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 - 07/Aug/06 09:40 AM
Hi,

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

Thanks


Shirley Keddy - 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 - 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 - 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 - 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] - 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 - 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 - 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 - 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 - 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 - 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 - 19/Jul/07 07:29 AM
we have just defined naming conventions for our hundreds of groups...

please please implement this feature.


Frank Stiller - 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.