Issue cannot be viewed and Permission Violation error is thrown
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Symptoms
Accessing existing issue throws Permission Violation message.
Diagnosis
Check if the user has permission to view other issue in the same project
- Check if none of the user in the instance can access the issue
Confirm if the issue does exist in the database
select * from jiraissue where issuenum=<issue_num> and project in (select id from project where pkey='<project_key>');
After confirming that the issue exist, check the issue is using the correct Security Level. In the database check the SECURITY column in the
jiraissue
table. Example:select id,SECURITY from jiraissue where issuenum=<issue_num> and project in (select id from project where pkey='<project_key>');
take note of the SECURITY's ID
Check which Issue Security Scheme that this security level is associated to:
select * from schemeissuesecuritylevels where id=<SECURITY_ID>;
take note of the Security Scheme ID under the SCHEME column
Compare the Security Scheme's ID with the one associated to the project . The {{SINK_NODE_ID}} must match the Security Scheme ID return in the Step 5.
select * from nodeassociation where SOURCE_NODE_ID in (select id from project where pkey='<PROJECT_KEY>') and ASSOCIATION_TYPE='ProjectScheme' and SINK_NODE_ENTITY='IssueSecurityScheme';
replace the <PROJECT_KEY> with the project's key
If the SINK_NODE_ID in Step 6 does not match SCHEME value in Step 5, this indicate the issue is using incorrect Security Level ID.
Optionally, confirm if there other issues in the same project affected by the same problem:
select id,issuenum from jiraissue where project in (select id from project where pkey='<PROJECT_KEY>' ) and SECURITY not in (select SECURITY from schemeissuesecurities where SCHEME=<SCHEME>);
Cause
The issue is referring to the Security Level ID that is not being used in the project.
Resolution
- Backup JIRA database before performing the following data modification
Run the following query to reset the SECURITY column to null
update jiraissue set security=null where id=<issue_id>;
this will make the issue accessible by all users that has the Browse Project permission in the project
- Set the Security Level in the issue via JIRA UI to secure the instance