As subject, I'm guessing I need to use scriptrunner somehow (hascomments) but I don't know how. Help appreciated!
I'm actually looking to see JIRAs with the most activity so it doesn't have to be comments necessarily. It could be number of visits on the JIRA etc. Any advice is appreciated, thanks!
Update: 7 August 2020, I forgot to mention that I am not the JIRA admin so if there is no easy way for a normal user to do this, I think I'll give it a pass.
Thank you all for your answers, it feels like most of the answers require admin assistance. I forgot to mention that I am not the JIRA admin so if there is no easy way for a normal user to do this, I think I'll give it a pass.
With Scriptrunner, there's a couple of options. Combining hascomments with aggregatefunction might be able to give you the plain numbers in a search.
But I'd be tempted to go the field route.
If you use a plain numeric custom field, you have an instantly searchable and sortable display of "number of comments". There are too many ways that a Behaviour would skip to populate this, you really need to do the counting in a listener there.
But even more simple would be a scripted field - you barely have to think about:
return (double) commentManager.getComments(issue).size()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Combining hascomments with aggregatefunction might be able to give you the plain numbers in a search."
Can you show me how to do this?
I am guessing I need to be an admin for the second part of your answer (which I am not).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Phil, I am not aware of any of the listed Scriptrunner jql functions to support this requirement directly.
But, you could use Scriptrunner scripted filed as a counter to increment every time issue is updated or/and viewed.
- to increment the number updates, you can either write a scripted post function or listener. And to increment the number views you can use the Behaviour.
- If detailed metrics is needed, you could use multiple scripted fields to collect data on different scenario / like, how many time commented, how many times viewed, how many time updated etc.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Phil ,
Here are few options -
- See this post
- Usage Statistics for Jira (this is a free cloud only plugin, but you can get in touch with the vendor to see if they have any plans on bringing it to server)
Best,
Sachin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.