You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
Is there a way to search tickets by who commented on them? I want to find tickets that a specific user has commented on. Is there a way to do that?
Or maybe search by watcher? Search tickets by a specific user who watches them?
In advanced search you can specify:
commentedBy = "user name" and then the rest of your search criteria.
For watcher specify:
watcher = "user name" and then the rest of your search criteria.
Thanks for the quick reply.
"commentedBy" does not appear as an option for me in advanced search. It says "Field 'commentedBy' does not exist or you do not have permission to view it."
Is there any trick to turn it on?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I apologize, that is available via the ScriptRunner app. I should have verified that prior to posting.
https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a bit clunky, but you can export a set of issues to CSV and then search the comment field(s). Note that you can export at most 1000 issues, so narrow the search criteria until you're under that threshold. "Number of Comments" > 0 is a start. Perhaps limit to modified within the last year or something like that as well. Once you have your matching issues displayed, click Export in the upper right and then CSV (All fields). Open in Excel, etc. and look for the comment column(s). There will be a column for each comment, so if, for example, one of your matching issues has 10 comments, there will be 10 comment columns. You could then use conditional highlighting or a similar tactic to identify rows containing the username of interest.
Or, if you or your DBA can run a query against the database, you could easily tackle it that way as well. I for the most part stay out of the database, but sometimes a quick query can be a good solution to something like this.
SELECT concat(p.pkey,'-',issuenum) as issueNum,ja.CREATED
FROM jiraaction ja
left join jiraissue i on i.id = ja.issueid
left join project p on p.id = i.project
where actiontype='comment'
and AUTHOR='USERNAME'
order by ja.ID desc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Payne that is great, can you please help me add to this query the issue id , issue created date and issue assignee to the columns?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here you go:
SELECT i.ID as issueId,concat(p.pkey,'-',issuenum) as issueNum,ja.CREATED as commentCreated,i.CREATED as issueCreated,ASSIGNEE
FROM jiraaction ja
left join jiraissue i on i.id = ja.issueid
left join project p on p.id = i.project
where actiontype='comment'
and AUTHOR='USERNAME'
order by ja.ID desc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.