How to get historical count of issues using JQL?

maksya December 26, 2019

Hi everyone. I have a JQL query and so I can easily get an appropriate count of JIRA issues, e.g. in the Search screen. Is there a way to get the count for the same query, but for a period like a month ago?

Regards,

Max

3 answers

1 accepted

1 vote
Answer accepted
Ignacio Pulgar
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.
December 27, 2019

Hi maksya,

I would suggest using a board for that purpose (either a Kanban or a Scrum one), so that you can check its Cumulative Flow Diagram report, which shows the number of issues in each selected columns over time.

For said report to count with the tools you need, follow these steps:

  1. (if PROJ lacks a board) Create a Kanban board based on the Jira project PROJ.
  2. (if PROJ lacks a board) The board columns will initially be To Do, In Progress, Done, and all statuses used in any workflows set on PROJ will be mapped to the appropriate column in regard to its status category (color). You may change this configuration to suit your needs, but ensure Resolved and Closed statuses are mapped to different columns than statuses which represent the issue has not been resolved yet. Usually, Resolved and Closed are mapped to the right-most column, unless transitioning from Resolved to Closed through the board would be the conveyed practice.
  3. Create a quick filter named problem with this JQL: labels = problem

You're all set-up! :)

After that, visit the board's Cumulative Flow Diagram report and:

  1. Click Refine report > Columns and select all columns to be shown, except those columns which have Resolved and/or Closed statuses mapped to them.
  2. Click Refine report > Filter and Select the problem quick filter.
  3. Select the time frame you're interested in.

cumulative-flow-diagram.png

And that's it! At this point you'd be able to track the number of unresolved problems over time.

Hope it helps.

maksya December 28, 2019

Wow. You rock, @Ignacio Pulgar ! It solves my problem completely.Annotation 2019-12-28 160244.jpg

Like Ignacio Pulgar likes this
Sylvain Leduc December 13, 2021

Thanks it helped me too !

Like Ignacio Pulgar likes this
Christina Mimler January 13, 2023

Thanks a lot! 

0 votes
Kin December 26, 2019

Hi @maksya , perhapse you can use "createDate >= start time and createDate <= endTime" to get the count.

maksya December 27, 2019

Hi @Kin , thanks for your answer, but I'm not interested in the creation date attribute when counting. I want to count some specific query scope, i.e. historical numbers for the "size of scope" retrieved by the query.

Regards,

Max

Bill Sheboy
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.
December 27, 2019

Hi @maksya and thanks for clarifying.

There are some status history search features that may help.  Maybe something like:

project = PROJ
AND labels = problem
AND status CHANGED TO Closed
DURING ('yyyy/mm/dd', 'yyyy/mm/dd')

Please look here for more details:

https://www.atlassian.com/blog/jira-software/jql-the-most-flexible-way-to-search-jira-24

 

Best regards,

Bill

maksya December 27, 2019

well.. historical operations like CHANGED are focused on some specific and limited fields, not my case..

Let me extend the example.

Say, I have executed my JQL (project = PROJ and labels = problem and status not in (Resolved, Closed)) in the search and got 10 issues on the 1st of Dec 2020.

The next day I have moved 2 issues from PROJ to JORP project. Now, on 2nd of Dec my JQL returns 8 issues.

The next day I added the label "problem" to 7 new issues from the PROJ. Now the result is 15 issues. It is on 3rd of Dec.

And finally on 4th of Dec I have transitioned to Closed 3 issues. Now just 12 issues.

So my ultimate goal in the case is to get the row: 10-8-15-12

Bill Sheboy
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.
December 27, 2019

Hi @maksya 

Thanks for the additional detail, and... I don't know how you would count changes to multiple criteria against a project's issues' logs with out of the box JIRA features for JQL.

Are you are using the Server edition?  If so, you may need to work with your admin to run some queries directly against the database for JIRA, and custom write them to match your criteria.

 

Best regards,

Bill

Like maksya likes this
0 votes
Bill Sheboy
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.
December 26, 2019

Hi @maksya 

What is the query for which you want to get older items?  Having this will help the community members answer your question.  Thanks!

 

Best regards,

Bill

maksya December 27, 2019

Hi @Bill Sheboy . Let it be even a simple JQL like:

project = PROJ and labels = problem and status not in (Resolved, Closed)

i.e. I can get the recent count of unresolved "problems" in the PROJ project, but I would like to get it for a moment a month ago, a week, etc. To build the trend of the counter.

Thanks,

Max

Suggest an answer

Log in or Sign up to answer