Count the number of comments made by user

Greg Brailsford January 21, 2015

Goal:

We want to track the number of unique comments our users are making in Jira.  We have reporting on the number of issues resolved, but we are trying to track details on a more granular level.  User make comments whenever they have logged some work or have new information for a ticket.  Having reporting on the number of comments a user is making will give a more accurate picture as to how much work a user is accomplishing.

What I have attempted:

We currently have  script runner and custom field "comment count".  However these return incorrect results because JQL is only capable of returning a list of issues.  From issue lists I can see the number of comments on each ticket, but often a ticket will have varying levels of collaboration resulting in comments made by different users.  A total count benefits the assingee not the individual user that made the comments.  

Can anyone think of a method to get the a total count of comments made by a user across all issues? 

We use eazybi for reporting as well but can't find a method to display the info correctly there.

Thanks.

 

 

 

5 answers

2 votes
Uday Karthik Yadlapalli January 22, 2015

Hello,

Try this plugin.

https://marketplace.atlassian.com/plugins/com.atlassian.jira.toolkit

You can get a comment count of each issue. (Also attachment count ,as added bonus  if you need)
Further you can write a JQL to find the comment count  by each user.
(I haven't tried this plugin, i just found it while looking for something else) 

 

Greg Brailsford January 22, 2015

Thanks this is a good addon, but does not solve my exact issue correctly. I currently have this addon installed. It gets close to the problem but is still limited by only returning the total comments on an issue or the total issues a user has contributed on. It does not show how much contribution users have made to the issue ie number of comments per user.

Uday Karthik Yadlapalli January 22, 2015

One other suggestion i could give is Database Custom Fields Plugin. You can create a custom field and query JIRA database to find the count of comments per each user. I am currently trying achieve this in my Test JIRA and i will let you know how it goes.

Deleted user July 15, 2020

Uday did this work?

1 vote
Jennifer Volpe June 27, 2019

hey! is there any option like https://marketplace.atlassian.com/apps/5142/toolkit-plugin-for-jira?hosting=server&tab=overview for Jira users on the cloud? thanks!

1 vote
Greg Brailsford January 23, 2015

I was having several issues with kepler and ended up having to remove that addon.  I found that Eazybi had the option to import from SQL.  I used a search similar to what Uday suggested and was able to import the information.  

Eazybi worked great because I was able to have that info in reports and in dashboards right away.  It was also nice because team leads can sort comments by date and other metrics if necessary. 

https://docs.eazybi.com/display/EAZYBI/Import+from+SQL+SELECT

Thanks for your help. 

Uday Karthik Yadlapalli January 23, 2015

Good to hear that. I Never used Eazybi, but will check it out now. Glad i could help you. If you think my answers helped you, Do please Up-vote. Thanks in Advance. Cheers !!

1 vote
Uday Karthik Yadlapalli January 22, 2015

Well this is what i tried and it looks like it might be close to what you are looking for.

https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.databasecf


Using database Custom Fields Plugin, i have created a custom field "Comments Count"
of type 'Data Table Information'. And i used a T-SQL query to get the data from JIRA Database.

Here is the query i used. You can modify it to get data specific to the projects you need, because the query i wrote now is getting the data from all projects in my JIRA instance.

SELECT AUTHOR AS User_Name, COUNT(*) AS Comment_Count
FROM Database_Name.jiraaction
WHERE actiontype = 'comment'
GROUP BY AUTHOR HAVING Count(actiontype) > 0

(Replace Database_Name with the name of the database your JIRA uses.)
Hope this works for your problem. Lemme know if you need any help. 

MattS
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.
January 22, 2015

I'd start with a description of the desired report. It sounds like you want be able to specify a jql filter and the produce a histogram of userids and the number of comments by each user in that set of issues. Personally I'd write a report plugin that does this or a gadget. I suppose a groovy script could also produce the same report but that's for JIRA admins only. Or a JIRA python script though it would be much slower.

Greg Brailsford January 23, 2015

With the help of IT we were able to access the database and found a table that showed the total amount of comments made by each user. It looked correct and exactly the type of data I am looking for. I am still working on setting up the configuration so that Kepler is able to display that info into JIra. I am hopeful that this solution will work. This is the resource I am using to configure the data source. http://confluence.kepler-rominfo.com/display/DBCF/Data+Source+Configuration Matt: My Team leads are looking for the ability to review the number of tickets each user has resolved. What number of those tickets were closed within our SLA goals. And the total number of comments each user made. The current limitation of any JQL search is that it returns issues. Thus creating problems getting an accurate count of a users comments across all of Jira. Currently the SLA and resolved issues is easily adjusted to review different time periods. I am worried with Kepler how difficult it will be to adjust the time frame that comments were made. I don't know yet if that is something Jira admin only will be able to adjust or if team leads will be able to adjust that info easily. I don't have the skills to be able to write a report plugin so I am hoping Kepler it be a solution.

Uday Karthik Yadlapalli January 23, 2015

Matt: I am a SQL Developer/DBA myself, so i find it comfortable to work with solutions involving Query's or Databases rather than Groovy or other Scripts. But i had to write a few Groovy scripts too for some customization. Greg: The table i found is "jiraaction", i don't know if that's the same table you found. But, Once you configure the context.xml file, you can play around with SQL queries to suit your requirements.

0 votes
Anita Kalmane June 16, 2020

Last week in the webinar I heard that Jira automation is offering this option now. Haven't tried to set it up myself yet though.

Madhu mullangi August 20, 2020

Hi @Anita Kalmane Have to tried this? thanks for any suggestions. 

Deleted user August 20, 2020

Same question did it work?

Anita Kalmane August 20, 2020

I haven't tried, so don't know if it worked, @Madhu mullangi , @[deleted] . When you try, do let the rest of us know :)

Tim Chen October 5, 2020

Hi there,

We also need this information.

Go through https://support.atlassian.com/jira-core-cloud/docs/advanced-search-reference-jql-functions/ , still not find any comment count API here.

Suggest an answer

Log in or Sign up to answer