Forums

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

Advanced filter using number of comments and date of last comment

Bashar Ayoub
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!
July 1, 2020

We have kicked up a project to clean-up a legacy project in JIRA.

With 3000+ open items we need the ability to filter out JIRA issues using the following additional criteria:

  • Number of comments. e.g. issues with 5+ comments
  • Last comment date. e.g. Last comment in the last 3 years.

 

If this can be achieved via Database queries, I appreciate more details on how to achieve this? 

2 answers

1 accepted

0 votes
Answer accepted
Derek Fields (RightStar)
Community Champion
July 2, 2020

Scriptrunner has a function called hasComments that takes a number expression (e.g., 3, +5, -10) and returns issues that match the number expression. It also has a lastComment function that will let you specify the date of the lastComment to return.

You can find scriptrunner in the marketplace

0 votes
Hernan Halabi - Elite IT Consulting Group
Community Champion
July 1, 2020

Hello @Bashar Ayoub welcome to the community, depending on the version you have just by seeing the projects list you should have the last time it got updated each project. That should help you easily identify the main candidates. 

If your version is too old you can't see that there and you will have to go to the database and run the queries there to get the information you are looking for. 

As far as I know, you can't get that information using jql only

Bashar Ayoub
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!
July 1, 2020

Version number is JIRA v7.1.4.

I have access to last updated date. However I am after filtering by number of comments and last comment date.

e.g. List all items created before 2010 and last comment added before 2015.

List all items created between 2010 and 2015 and last comment added before 2018.

Hernan Halabi - Elite IT Consulting Group
Community Champion
July 1, 2020

Then it's going to be via database queries. We used to have those queries but for older versions and I'm not qualified to help you create a new one. Hopefully someone else in the community can better help with that part. 

Optionally check for apps like this one

https://marketplace.atlassian.com/apps/1220583/simple-last-comment-for-jira?hosting=server&tab=overview

Those might help as well.

Like Bashar Ayoub likes this

Suggest an answer

Log in or Sign up to answer