JQL Filter Due Date and Diagrams

Simon Müller November 11, 2020

Hi together,

 

i would like to ask if anyone knows how to build a complex JQL Query which includes the following content:

 

Issues which are overdue

Issues which are in time (have time till due)

Issues which are closed

 

The reason why i am asking is, my department wants to have Diagrams which include this content.

 

For Example a pie diagram which three pieces shown all of those three.

dd.PNG

As my knowledge, the only possibility to show all of those three filter in one pie diagram is to put it into just one filter, is this right?

 

Thank you in advance.

1 answer

1 accepted

1 vote
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2020

Hi @Simon Müller,

Welcome to the community, with an interesting use case :-). If I understand you well, you want to pull all issues (for the sake of complexity, I will assume these are all in 1 Jira project) in a single query, but then divide them across different segments based on:

  1. Resolution state (Open vs Resolved)
  2. Being on time (subsegment of open issues, based on due date)

Those are essentially 3 different queries:

Project = XX and Resolution != Unresolved (1)
Project = XX and Resolution = Unresolved and Due >= Now() (2A)
Project = XX and Resolution = Unresolved and Due < Now() (2B)

Combining those in 1 single query is not difficult at all, since they will return all issues in your project:

Project = XX

In order to combine the 3 data sets in a single pie chart, you will need to mark your issues with the current state they are in. Options could be assign them a label (On Time, Overdue, Closed) or set up a custom field (select list, radio buttons) to mark them.

You would need to set up some automation to update the labels / custom field to keep them in the right category. e.g. every issue could be created with the On Time label by default. When the due date passes and the issue is still unresolved, update it automatically to Overdue. When an issue is resolved, update it to Closed. Marketplace apps like Scriptrunner or Automation for Jira can help you fix the automation part. 

As soon as you have the categorisation part in place, your pie chart becomes easy. Just build your pie from the category.

A couple of site notes:

If you choose to use labels, be mindful of the fact that labels may be used for other things as well. So the query for you pie chart would need to be something like this:

Project = XX and labels in ("On Time", Overdue, Closed)

Also related to the use of labels - when you add a new label, you should be careful to also remove the old label at the same time.

And finally, although this approach may work, it is certainly not the only solution to visualise this type of information. Alternatives may include:

  • Instead of trying to fit this information in a single pie chart, create 3 gadgets on a dashboard showing details of the separate queries I listed at first.
  • Use a reporting app from the marketplace that has the capability to use calculated measures as a basis for your report (e.g. EazyBI).

Hope this helps!

Simon Müller November 26, 2020

Hey @Walter Buggenhout ,

 

thank for that fast response, it helped a lot!

 

Our System works great now!

 

Great Community :)

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2020

Glad I could be of assistance, @Simon Müller

Would you mind accepting my answer as well? That does help other users with similar questions finding answers easier;

Thx! 

Like Simon Müller likes this

Suggest an answer

Log in or Sign up to answer