I tried to create a query to list all open issues that refer to me by name or username reference but can't understand why a particular issue isn't showing up.
Here is the query I put together:
status not in ("MERGED / DONE", "ON PROD / DONE") AND (summary ~ currentUser() OR description ~ currentUser() OR text ~ currentUser() OR comment ~ currentUser() OR summary ~ Scott OR description ~ Scott OR text ~ Scott OR comment ~ Scott OR assignee = currentUser()) ORDER BY created DESC
I am able to get the issue to show up with the comment example below not referring to my name in a comment so I know it doesn't have to do with the status and tried different things and am baffled.
status not in ("MERGED / DONE", "ON PROD / DONE") and (comment ~ "I updated instruction" OR comment ~ "@zzzzDoesntmatterzzzzscott") ORDER BY created DESC
My name is definitely referred to multiple times in the comments. Does anyone have any suggestions and/or additional troubleshooting tips I should try?
Hi Scott,
I see that you are looking to find via JQL issues where someone has left an @ mention of your account, however this is not working as expected. I actually recently had another user bring this to my attention in https://community.atlassian.com/t5/Jira-questions/Find-all-mentions-in-comments-via-JQL/qaq-p/1126099
From that answer:
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.
As such, these text fields are not designed to be able to used to return this JQL function currentuser(). Sorry there doesn't seem to be a better answer right now. I would recommend watching that feature request for updates.
On a side note, there is no need to search description, summary, comment, and text separately for the same values in your query. When you use the text field it searches all of these fields, plus all text custom fields, see details in Advanced Searching Fields Reference: Text.
Regards,
Andy
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.