Hi!
I was asked to find out, if a watcher was added to an issue at a certain date/time. It isn't recorded in the Issue History Tab...maybe via database query?
Cheers!
Sebastian
Hi Sebastian,
try this:
select pkey, cwd_user.user_name, userassociation.created watcher_since from userassociation, cwd_user, jiraissue where cwd_user.lower_user_name = '<UserName>' and jiraissue.pkey='<YourIssueKey>' --XXX-123 and jiraissue.id = userassociation.sink_node_id and userassociation.association_type='WatchIssue' and userassociation.sink_node_entity ='Issue' and userassociation.source_name = cwd_user.user_name;
Hi Udo!
That works, thank you!
Regards,
When I tried that, it didn't show any values under pkey. Here's my modification to Udo's SQL:
select concat(project.pkey,'-',jiraissue.issuenum) as pkey_issuenum, cwd_user.user_name, userassociation.created watcher_since 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
Also see this issue: https://jira.atlassian.com/browse/JRA-61600
Hi Philip, Hi Udo!
Is there a way to find exactly who and when made changes at the watchers list?
With regardsVyacheslav
Updated version of SQL - it is more correct in some cases
SELECT DISTINCT CONCAT(project.pkey,'-',jiraissue.issuenum) AS pkey_issuenum,cwd_user.user_name,userassociation.created watcher_since-- ,userassociation.*FROM userassociationJOIN app_user ON app_user.user_key = userassociation.source_nameJOIN cwd_user ON app_user.lower_user_name = cwd_user.lower_user_nameJOIN jiraissue ON jiraissue.ID = userassociation.SINK_NODE_IDJOIN project ON project.id = jiraissue.PROJECTWHERE userassociation.association_type='WatchIssue' AND userassociation.sink_node_entity ='Issue'-- and project.pkey = 'XXX' AND jiraissue.issuenum = 1111ORDER BY `cwd_user`.`user_name` ASC
It looks like you're new here. Sign in or register to get started.