How to fetch all the comments with @mentions

Julie Li January 23, 2024

I want to collect all the comments with @mentions in an efficient way, do we have any direct way?

4 answers

1 vote
Vitalii_Bobak_SaaSJet
Atlassian Partner
October 15, 2024

Hi  and everybody who is looking for solution 

If you're seeking an easier alternative to JQL and want to view mentions on dashboards, give Mentions Dashboard for Jira a try.

This add-on is designed to to fetch all the comments. Add-on help you keep track of mentions you haven't responded to yet, or those where you've mentioned your coworkers and want to see if they've replied.

image.png

Add-on developed on Forge ensures secure data storage
Add-on newly released and developed by my team.

I hope you find this helpful 🚀

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2024

Hi @Julie Li 

What problem are you trying to solve?  That is, why do this?  Knowing that may help the community to offer better suggestions.  Thanks!

Until we know that...

 

Mentions in Jira comments, text fields, etc. are represented internally this way:

[~accountid:some user's account ID]

That information could be used with JQL to identify the issues with mentions like this:

project = yourProjectName AND comment ~ accountid

 

The more difficult part is getting only the comments with mentions.  If there are not that many issues (e.g., less than 100) and not that many comments, an automation rule could use the results of that JQL to parse out the comments and filter them, only returning the ones with mentions.

 

Kind regards,
Bill

Julie Li January 26, 2024

Hi Bill, actually I want to filter all the comments with mentioning specific user and handle these comments together quickly.

Julie Li January 26, 2024

So if I can get all the comments with @mentions,it could be more efficient.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2024

Thanks, and I understood "what" you were trying to do; I was asking "why" that was needed.  Often knowing the why can reveal other possible approaches.

As I described, an automation rule could find a limited number of such comments.  To get more returned values, consider investigating the Atlassian Marketplace to learn if any JQL addons would help.

Julie Li January 28, 2024

Thks Bill,  If there is no direct way, we will try to do it via automation rules. But let me describe the "why" here again to see if there is any other possibilities. We have an account called 'Bot-Help', we want to fetch all the comments when other users @bot-Help, so that we can manage and handle these comments directly

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2024

Thanks for clarifying, Julie!

In which projects will users comment to the bot user: one project, several, all of them?

  • If to one project, an automation rule could trigger on issue commented, check for the mention of the bot, and then forward that for some action.  Or, a scheduled rule could check once per-N-time-units (e.g., daily) to forward the mentions in an email.
  • If to several, or all, projects...the same rule could be used from the global rules scope

Before trying either of these, I recommend investigating how many comments you expect.  If it is many (i.e., hundreds per day or more), please discuss this problem with your Jira admin to consider options.  Otherwise this single automation rule could use up the monthly automation allocation.

1 vote
Manne Kjærby - ProProces
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2024

Hi Julie.

 

If you want to search for mention where you are mentioned you could try:

comment ~ currentUser() 

 

If you want to search for comment where the just is a mention with out a specifc reference to a user, i don't believe you can do that.

The matter have been discussed here:

https://community.atlassian.com/t5/Jira-Software-questions/Find-all-mentions-in-comments-via-JQL/qaq-p/1126099

There is a feature request for it here:

https://jira.atlassian.com/browse/JRACLOUD-27594

 

Kind regards

Manne

Julie Li January 23, 2024

Hi Manne,  I know the JQL can help, but it only return the issues. Actually, I am looking for a efficient way to return all the comments containing @mention, not all the issues.

Julie Li January 23, 2024

Here @mention is one user. 

comment ~ currentUser() 

This way can get all the issues, but do we have any way to get all comments directly? 

Manne Kjærby - ProProces
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2024

Hi Julie.

Out of the box there is no functionality to do that in the issue search.

I'm not aware of any apps that can provide that. But you could search marketplace.

Julie Li January 26, 2024

Sure, thanks Manne

0 votes
Julie Li January 23, 2024

I know the JQL can help, but JQL only return the issues, actually, I am looking for a efficient way to return all the comments containing @mention.

comment ~ "mention"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events