Identify date/time of a watcher being added to an issue
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
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.
Problem
To identify when a watcher was added to an issue via database query
Resolution
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'
ORDER BY app_user.user_key ASC;