How to recover the comments viewable by a Project Role which has been deleted
- You have a project role named "OLD" which was created some time ago.
- Under circumstances, you decide to delete it and replace by a new project role named "NEW", or you have accidentally delete it.
- Some users have comment viewable by "OLD" project role on some issues, and now those comments disappear on the issues. (This is the expected behavior, since the project role does not exist anymore)
- You want to retrieve the comments and move it to the new project role "NEW"
- You know at least one issue's issue-key and comment detail which is related to the project role "OLD".
Before you begin:
Always BACKUP your data before you perform any changes in your database and please ensure that you at least have a basic database knowledge before proceeding
Steps to recover the comments:
You should know any issue's issue key which is having this problem. For example, "TEST-1" in this case, then you can run the following query in your MySQL database:
This is for checking the rolelevel for the comment which has been viewable by project role "OLD" (The rolelevel and old comment for "OLD" still exists in your database even after you have deleted the project role) Please see the attachment below:
In this example, the rolelevel is 10101
Find out the rolelevel from last query and run:
This is for updating all the comments which have been restricted viewable by "OLD" to the new project role "NEW".
Was this helpful?
Thanks for your feedback!