Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I order JIRAs by most comments made in the search screen?

Phil August 6, 2020

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.

4 answers

0 votes
Phil August 7, 2020

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.

0 votes
Nic Brough -Adaptavist-
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.
August 6, 2020

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()

Phil August 7, 2020

"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).

0 votes
Muthu Thiruppandy
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.
August 6, 2020

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.

0 votes
Sachin
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.
August 6, 2020

Hello @Phil ,

Here are few options -

- See this post

- Issue History Collector 

- 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.


 

Suggest an answer

Log in or Sign up to answer