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!
I'm facing the same issue, did anyone got a solution?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Peter McAndrew kindly use below query :-
commentedOn (‘2021-07-23’) AND commentedBy = ‘jsmith’
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
complete details is available at URL https://scriptrunner.adaptavist.com/4.1.3.9/jira/jql-functions.html#_hascomments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't work for me, I get an error
I believe this is because that function doesn't exist for the Cloud version of script runner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh okay then we can use the below one
commentedOn = '2021-07-23' AND commentedBy = 'userid'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Peter McAndrew I am using Jira Data Center
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.