How to migrate groups to roles in comment visibility?

giacomini March 7, 2013

I'm trying to get rid of groups in my Jira instance, replacing them with project roles. I'm currently stuck with a group that has been used to reduce the visibility of some issues. If I try to delete the group Jira warns me that:

There are comments that only this group can see.

Deleting this group would make those comments invisible.

and gives me the possibility to move those comments to another group (!). Is there any way out? for example, is there a way to select those comments so that I can change the visibility manually to a role?

1 answer

1 accepted

1 vote
Answer accepted
Yilin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2013

That is not possible, but you can remove the all group restirction by running the following query:

update jiraaction set actionlevel=NULL where actionlevel is not NULL;

If you wish to direct switch the group to role, you probably need to pick up the project role id in the table projectrole then add it in the same table.

After that you will need to restart JIRA and reindex the whole instance.

giacomini March 10, 2013

Thanks for your help. Based on that I found https://confluence.atlassian.com/display/JIRACOM/Example+SQL+queries+for+JIRA#ExampleSQLqueriesforJIRA-Retrievingtheissuekeyandcommentsthatarerestrictedtoagivengroup. which is very very close to what I need in order to find the issues that need some editing. Fortunately the query returned just a handful of issues, which I'm processing manually.

So far it has worked for a group (two edited issues), but has failed for another: despite the fact that I've removed the group from the visibility constraint (this is confirmed by the sql query), I'm still unable to remove the group itself. Is there any other place that the group can hide apart from Permission Schemes, Notification Schemes, Issue Security Schemes and Saved Filters?

By the way, the visibility of a comment that has been expressed in terms of groups is editable only if the Comment visibility in the General configuration is set to "Groups and Project Roles", otherwise one gets a permission failure to edit the comment.

Suggest an answer

Log in or Sign up to answer