Unable to view comments on an issue
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
When viewing an issue, its comments will not load and an error will display instead.
Environment
Jira Server or Data Center 9.7+
Cause
This most often occurs when a single comment has been pinned twice
Diagnosis
When viewing an issue and checking the comments, they will not load and follow error will be present;

Preventing users from seeing any comments added to the affected issue. Additionally, the following error will appear in the atlassian-jira.log:
1
2
2023-06-16 10:16:29,140+0200 http-nio-8080-exec-35 ERROR /browse/XXXXX [c.a.j.plugin.issuetabpanel.IssueTabPanelInvokerImpl] Exception thrown while trying to call getActions() for com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel (Display issue comments)
2023-06-16 10:16:29,141+0200 http-nio-8080-exec-35 WARN /browse/XXXXX [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.IllegalStateException - Duplicate key 430838 (attempted merging values CommentPinDTO{id=10109, issueId=261294, commentId=430838, pinnedBy=username, pinnedDate=2023-06-13 09:14:41.860863} and CommentPinDTO{id=10108, issueId=261294, commentId=430838, pinnedBy=username, pinnedDate=2023-06-13 09:14:41.851677})'.
The above error shows there is a single comment that has been pinned twice. The duplicate records can be checked against the Jira database using the following query;
1
select * from comment_pin where comment_id = <commentId>;
Where the comment_id can be found in the error that appears in the logs.
This will return results similar to;
1
2
3
4
id | issue_id | comment_id | pinned_by |pinned_date
{{--------------------------------------------------------------- }}
{{10108|261294 |430838 | username | 2023-06-13 07:14:41.851677+00 }}
{{10109|261294 |430838 | username | 2023-06-13 07:14:41.860863+00 }}
Solution
After running the query and confirming the existence of a comment being pinned multiple times. Carry out the following steps to remove the duplicate record from the database;
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Stop Jira
Delete one of the duplicate rows from the diagnosis query
1
delete from comment_pin where id = 10108;
Start Jira
Check affected issue and comments
Was this helpful?