Find comments added on specific date by specific user

Peter McAndrew July 23, 2021

Hi there,

I'm trying to create a filter in JIRA Cloud which would return a list of issues where user x has added a comment on a specific date.

I've tried using market place apps but they don't seem to offer any solutions, the latest one I've tried is  scriptrunner enhanced search.

This is my query : commentedby = 'user x' and commentedon = '2021-07-23'

The result I get it all issues with a comment added on 23rd July and user x has commented (at any point in the past)

The result I want is only those issues where user x has commented on 23rd July.

Would be great to hear any suggestions about how to achieve this!

5 answers

1 vote
Labutte Jerome Mackenzee
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2024

I'm facing the same issue, did anyone got a solution?

1 vote
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2021

Hi @Peter McAndrew This is not possible via standard jira. But with the help of plug-ins like Script Runnner and JQL Search Extensions for Jira.. you will be able to do this.

for script runner :- 

commentedOn (‘2021-07-23’) AND commentedBy = ‘jsmith’

https://scriptrunner-docs.connect.adaptavist.com/jiracloud/jql-aliases.html

 

for jql search extension :- 

commentedOnDate = now() AND commentedByUser = “Vikrant Yadav”

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/3375124

Thanks

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2021

@Peter McAndrew kindly use below query :-

commentedOn (‘2021-07-23’) AND commentedBy = ‘jsmith’

Peter McAndrew July 26, 2021

Thanks @Vikrant Yadav but this is the query i'm already using and it doesn't return what im looking for:

issues where jsmith has commented on 23rd July

instead it returns issues that recieved a comment on 23rd July and where jsmith has commented on any day.

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2021

Hi @Peter McAndrew If you recently installed ScriptRunner, FIrst  you have do the initial synchronization on the JQL Keywords Sync page found in the Add-ons Administration section of Jira. Once Sync is complete then search for issues. 

KIndly check this document :- https://scriptrunner-docs.connect.adaptavist.com/jiracloud/jql-aliases.html

JQL Search.PNG

Peter McAndrew July 27, 2021

Thanks I did that.  The support team at script runner have confirmed this isn't possible in their cloud version.  Hopefully there is another app/solution that will pop up here.

0 votes
Kate Kabir
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.
July 27, 2021

Hi @Peter McAndrew 

Thank you for your question.

In regards to your enquiry, the keywords work is commentedBy returns issues a user has commented on and commentedOn returns issues where a comment was added on a certain date and the returned value that you are seeing is as expected. This is how the keywords work in the cloud environment. 

At the moment, we do not have a way to search just for issues commented by a specific user in a timeframe yet. 

Furthermore, the documentation link mentioned by other users is for Server. You may kindly refer here for the ScriptRunner Enhanced Search for Cloud documentation.

I hope this helps.

Thank you, Peter

Kind Regards 

Kate

Peter McAndrew July 27, 2021

Thanks Kate, the answer is helpful and I appreciate the support you gave on the ticket I opened with Scriptrunner support. 

I'm still hoping that someone else in the community will have another idea about how to achieve the result I'm after even if you don't support it in your cloud app yet!

Peter

0 votes
Girish_Shenoy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2021
Peter McAndrew July 26, 2021

I think these docs are for the DC or server version?  I get 'Function 'commented' does not exist'

I tried this query:

issueFunction in commented("after -4w by jbloggs")
0 votes
Uday Kiran Bhaviri July 23, 2021

I think you can try the following JQL, if you have ScriptRunner installed... because here I have used issueFunction

issueFunction in commented("on 2021-07-23 by userid")
Peter McAndrew July 26, 2021

This doesn't work for me, I get an error 

Function 'commented' does not exist

I believe this is because that function doesn't exist for the Cloud version of script runner?

Uday Kiran Bhaviri July 26, 2021

oh okay then we can use the below one

commentedOn = '2021-07-23' AND commentedBy = 'userid'

Girish_Shenoy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2021

@Peter McAndrew 

the expression works only if you have scriptrunner add-on. see the image below.

2021-07-26_21-30-15.png

Peter McAndrew July 26, 2021

@Girish_Shenoy are you using Jira Cloud or Server?

I still get an error:

image.png

Like Girish_Shenoy likes this
Peter McAndrew July 26, 2021

@Uday Kiran Bhaviri  your query is the same as the one in my orginal post.  The query looks like it should work, but it actually produces a different set of results. 

Girish_Shenoy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2021

@Peter McAndrew  I am using Jira Data Center

Nico Buffing December 14, 2021

I think alternatively you can use the profile option and click on the "Worked on" overview, it will list by date all the tickets the user has commented on and has updated. 

Suggest an answer

Log in or Sign up to answer