Identify date/time of a watcher being added to an issue

Still need help?

The Atlassian Community is here for you.

Ask the community

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, cwd_user.user_name, userassociation.created
FROM
 userassociation
JOIN
 cwd_user
ON
 userassociation.source_name = cwd_user.user_name
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 cwd_user.user_name ASC;
Last modified on Aug 4, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.