How to identify when a watcher was added to a Jira Data Center issue
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
In Jira Data Center, you can find any watcher who has been added to a Jira issue. You can search the issue's history to find the date of that change. The following solution helps you to find all watchers of a specific issue using the database.
Solution
To use the following database query, you will need to replace
<PROJECT_KEY> with the project key
<ISSUE_NUM> with the issue number
SELECT
concat(project.pkey,'-',jiraissue.issuenum) AS pkey_issuenum, app_user.user_key, app_user.lower_user_name, userassociation.created
FROM
userassociation
JOIN
app_user
ON
userassociation.source_name = app_user.user_key
JOIN
jiraissue
ON
jiraissue.ID = userassociation.SINK_NODE_ID
JOIN
project
ON
project.id = jiraissue.PROJECT
WHERE
jiraissue.id = userassociation.sink_node_id AND userassociation.association_type='WatchIssue' AND userassociation.sink_node_entity ='Issue'
AND
jiraissue.id = (select id from jiraissue
where project in (select id from project where pkey = '<PROJECT_KEY>')
and issuenum = <ISSUE_NUM>)
ORDER BY app_user.user_key ASC;Was this helpful?