Identifying the difference between restricted and unrestricted comments in the Jira Database
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on 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.
*Fisheye および Crucible は除く
要約
In the Jira Database, restricted comments have the 'rolelevel' set to the ID of the role, or 'actionlevel' set to the group they are restricted to.
Below we will demonstrate how to identify these issues.
Finding restricted Comments
We spun up a test instance and created three comments:
- One comment that is unrestricted
- One comment that is restricted to Administrators role
- One comment restricted to members of group 'group1'
Next, we did a simple query to find out the difference between the three comments:
select * from jiraaction;
Results:
ID | issueid | author | actiontype | actionlevel | rolelevel | actionbody | created | updateauthor | updated | actionnum |
10000 | 10000 | JIRAUSER10000 | comment | (null) | (null) | This comment is available to everyone | 2021-01-08 11:57:06 | JIRAUSER10000 | 2021-01-08 11:57:06 | (null) |
10001 | 10000 | JIRAUSER10000 | comment | (null) | 10002 | This comment is restricted to the Administrators role | 2021-01-08 11:57:26 | JIRAUSER10000 | 2021-01-08 11:57:26 | (null) |
10002 | 10000 | JIRAUSER10000 | comment | group1 | (null) | This comment is restricted to members of group1 | 2021-01-08 11:58:31 | JIRAUSER10000 | 2021-01-08 11:58:31 | (null) |
From the results, it appears that:
- Unrestricted comments have 'rolelevel' and 'actionlevel' set to (null)
- Role-restricted comments have the 'role level' set to the ID of the Role (in this case, Administrators)
- Group-restricted comments have the 'actionlevel' set to the name of the Group
To find all comments restricted to a specific role
Find the role ID and use it to replace <ROLE_ID> in the following query:
SELECT * FROM jiraaction WHERE rolelevel = '<ROLE_ID>';
To find all comments restricted to a specific group
Replace <GROUP_NAME> in the following query with the group name:
SELECT * FROM jiraaction WHERE actionlevel = '<GROUP_NAME>';