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,554,756
Community Members
 
Community Events
184
Community Groups

Find all mentions in comments via JQL

Hello,

 

I have seen several other posts about this, however I can not get the intended outcome.

 

I want to find all mentions of a user (in this example, myself). I use the query

comment ~  currentUser()  

 And I do indeed find mentions of myself. However Only in old projects, not in any new projects (projects started ~1month ago). If add a filter for a specific (new) project, the query returns nothing

 

Is this just a bug with Jira? Am I doing something wrong?

 

Thanks in advance!

6 answers

1 accepted

7 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 11, 2019

Hi David,

I understand that you are using Jira Cloud and want to find all the @ mentions in comments of a particular user.   It appears that you can find some of these with the currentUser() function, but not all examples appear here.

I am actually surprised to see that you could use that specific JQL function in the comment search field at all.  When reviewing the documentation of that function in Advanced searching - functions reference - currentUser(), you can see that the only supported operators for this are = and !=.   However since text fields like comment only have supported use of ~ or !~ the text fields like these are not unsupported to use that kind of function.   I am surprised to see currentuser() work at all in this context to be honest.  I have only ever seen it used in regards to userfields directly, like reporter, assignee, or custom fields of type user.  

There is an outstanding feature request that relates directly to this topic in JRACLOUD-27594 - JQL search for @mentions.  This is not something that Jira has historically been able to do, so a feature request is more appropriate here than a bug ticket would be.   I would recommend voting that issue up.

I have reviewed this topic and I can't seem to find a valid work-around that exists for Jira Cloud today.  It seems there could be other 3rd party plugins for Jira Server that might help here to search on this, but Jira Cloud does not appear to have a working solution. 

I can see why this would be helpful to have.   I have tried to update that existing feature request to detail the problem here further and try to explain why this would be helpful.  Sorry I don't have a better answer right now for this one, but I would recommend watching this issue for updates.  I can't promise this issue will be worked anytime soon, but it feels like this ability could bring real value to lots of users.

Regards,

Andy

Great, thank you for your (very detailed) reply! Atleast i have the knowledge that it is not supported (yet)!

hopefully we can get support sometime soon :) 

Like Arthur Ter-Grigoryan likes this

comment ~ currentUser()

seems to be working now...!

Like # people like this

This still doesn't work for me it only shows a few select issues but definitely not all of them

seems to be working for Confluence side but not Jira... my workaround is to use their mobile app - that's giving you all the @ mentions

I tried the 

  1. Click on your user icon in the bottom-left corner and select "Profile"
  2. You'll need your User ID - this is the long alphanumeric sequence after "/people/" in your URL bar - copy and paste this
  3. Go to the issue search page and press "Switch to JQL" if in basic search mode
  4. Now in the search bar, put in "comment  ~ <<your User UD>>" and press Search

BUT "comment  ~ <<your User UD>>" didn't work for me on JIRA clouds

HOWEVER when I changed it a bit as shown in the below line it did work ->

SOLUTION --> comment ~ '123456'

(For example sake please consider my user ID as 123456 and yes I used single quotes before and after my user ID)

This worked great!  I was able to use it to find comments for another user, I viewed their profile and grabbed the end of the URL after "users/"

 

Thanks!

Like # people like this

It seems this only works with specific users. Is there any way to make this work with currentUser()?

This worked for me, too! Thanks for the tip.

Like Bharat Kini likes this

Hey @Jim Ryan  have you tried -> assignee = currentUser()

this one works for the current user in both JQL's and quick filters in JIRA cloud

@Bharat Kini 

Thanks for the suggestion. However, your suggestion only finds issues that are assigned to the current user. The OP (and I) are looking for all issues where the current user is mentioned.

Hey @Jim Ryan , have a shot at the below JQL, looks like it works for the problem statement you gave me.

comment ~ currentUser() and updatedDate >= -3d

The first parameter "comment ~ currentUser()" filters all the tickets across all projects which have the current user @ mentioned in the comments from the dawn of time.

The second parameter "updatedDate >= -3d" filters in only the recently updated ones cause I believe that's what most folks are interested in. In this case '-3d' stands for the tickets updated in the last 3 days.

Feel free to change the number 3 in the second parameter, which controls the time period or range of recent tickets you'd like to see.

Let me know if this helped ya.

Like # people like this
Kathy Barton
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.
May 05, 2022

@Bharat Kini that's the query I'm using but it has the problem that it finds any mention in the entire history of the ticket as long as someone has made an update in the last 3 days. So in the case where I was mentioned in a comment in 2020 but then the ticket was updated yesterday, it shows up in my filter, even though the actual comment with me in it was years ago. I've hunted all over but I can't find a way to filter on the date of the mention (on cloud). Have you ever seen anything like that? 

Like George Grigorian likes this

try filtering to the current sprint 

Like George Grigorian likes this

that's a great idea @Mikaela Bertucci but I run Kanban for my DevOps team. I wish we were running sprints! I'll remember that for future other teams though! Thanks! 

This works:

text ~ "accountid:123456:1234567a-123b-123c-1234-123456789012"

Thanks for this - for others trying to implement - capture the account id string above by creating a @mention on a ticket and then inspecting that link. Use that link as a text ~ "your-link-here" quick filter.

Lauma Cīrule
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.
Mar 13, 2020

Hi,

Thanks for this suggestion! I was trying to search in a custom text field for mention with the following query, but nothing was returned, though there should have been one issue. Am I missing something?

project = ProjectName AND fixVersion in (Version1, Version2) AND "Testing status" ~ "accountID:557058:e1f9e60e-8a47-4d93-8014-2b10add40d82" ORDER BY updated DESC

Lauma 

This is useful, but is there any way to make it work with "currentUser()"? I need to create a dashboard that is shared across my organization that any user can view and see all the comments where they are mentioned.

Like # people like this

Isso mesmo, e inclusive você pode integrar com o Slack

slack.png

Like Robert Haslam likes this

We can also create a filter for others who are mentioned in the comments by below query

project = test AND status in ("Work in progress") AND reporter in (62123455678888) AND text ~ "1234565678678607". You can find the person's account id by selecting the user in assignee and switch to JQL query. You will get account id of that person.

As of 2022 in our on premise instance, I can use "comment ~ [Username]" where [Username] is the user name from your profile.

Let's me know if a valid work-around is available.

You can try plugin https://marketplace.atlassian.com/apps/1222753/user-mentioned-jql but it's only available for Jira Server.

Suggest an answer

Log in or Sign up to answer