JQL Comments from current user

Paul Alexander
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.
June 4, 2020

These queries once worked properly, returning matches for all places where I made a comment in Jira. Now neither query works. The first one returns just a random selection of matches while the second one returns some of the issues but it missing some. While I realize the currentuser() function claims to not support the comment property, this was working until recently. Anyone experience the same or have a workaround to offer? Thanks for your time.

comment ~ currentUser()

comment ~ currentUser() AND updated > -14d ORDER BY updated DESC

2 answers

1 accepted

1 vote
Answer accepted
Piyush_Annadate June 5, 2020

Do you have Scriptrunner - if so:

issueFunction in commented ("by piyush_annadate before -5d")

Paul Alexander
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.
June 5, 2020

That is a fair solution. While I don't have this plugin, it is something I've been following for a while. I think it's even Cloud-capable now to handle some of the features of the server-capable product, right?

Piyush_Annadate June 9, 2020

This is a generic (I think so); which would be applicable to Cloud too. Let me search for alternate solutions.

The query you have stated "comment ~ currentUser()" returns issues wherein the userID is in the comment context; not by the user.

 

https://community.atlassian.com/t5/Jira-questions/How-can-I-filter-for-all-issues-where-I-have-commented/qaq-p/223917

Paul Alexander
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.
June 11, 2020

Good point; I'll let my user who raised this concern know that the query wasn't actually looking for comments by the logged in user.

Paul Alexander
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.
June 11, 2020

No we don't have that plugin (yet).

1 vote
Ziad Bakhiet October 13, 2020

Hello Paul,

You can get the result using JQL Search Extensions

You can search for issues that were commented by a particular user using the following JQL:

commentedByUser = "username"

There are many other functions related to comments like:

The full documentation can be found here.

Regards,

Ziad

Paul Alexander
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.
October 13, 2020

While this does appear to be Cloud documentation you've pointed me to, none of these functions work on my tenant. Here's one example. Without the parentheses, the property is assumed to be a field and obviously fails. Including the parentheses also not work. Perhaps my tenant isn't as up to date as others and yes, I've been on the Cloud product for nine years. And none of the other comment-related functions in this documentation from Ziad works.

commentsCount > 0

Field 'commentsCount' does not exist or you do not have permission to view it.

commentsCount() > 0

Error in the JQL Query: Expecting operator but got '('. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 14)
Like Richard Pitruzzello likes this
Ziad Bakhiet October 14, 2020

Hello Paul,

This documentation is not the native cloud documentation, it's for the add-on  JQL Search Extensions

Regards,

Ziad

Paul Alexander
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.
October 14, 2020

I see I completely missed the context here. Sorry about that. I guess I'll have to invest in yet another add-on which will run me another $2,550 annually.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events