Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,655
Community Members
 
Community Events
175
Community Groups

Is there a way to search by commenter?

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?

 

2 answers

2 accepted

1 vote
Answer accepted

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?

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

Ah, I understand.

Thank you for the information.

0 votes
Answer accepted
Payne Rising Star Jun 07, 2021

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

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?

Payne Rising Star Dec 08, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events