Forums

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

How to write JQL to return a total number not a list of all issues

Anna Comer
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!
October 15, 2021

I am trying to make a table with numbers only- broken down by status/subtrack/type I am attaching my current JQL but need Jira to return only a number not the list of issues. 

project = **** AND issuetype = "User Story" AND status = Done AND Sprint = 296 AND "Sub Track[Dropdown]" in (RTR-GL) AND "Subtype[Dropdown]" = Report

4 answers

2 votes
Katerina Kovriga _Stiltsoft_
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.
October 16, 2021

Hi @Anna Comer ,

We can suggest trying the Table Filter and Charts for Confluence app and its Table Filter macro - you'll be able to show all the issues via the Jira Issues macro and filter the result table from the page view by one or several fields. The number of the filtered entries will be shown near the table as well.

0 votes
Carla Ann Rowland
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.
October 16, 2021

This is a "long" way solution; I have tested it with tasks and subtasks but if you have sub-task filter functionality with Scriptrunner you can try this basic concept:

  • Create a filter for specific set of issues 
  • Display that filter result in Confluence using the display option to display the total only
  • In my example my filter is basic in JIRA Cloud (all issues unassigned) and I call it in confluence cloud and display the total only:

confluence cloud table total snapshot.PNG

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.
October 15, 2021

No, JQL is for finding issues, nothing else.  The only possible result from JQL is a list of matching issues, that's what it is built for.

That said, there are plenty of reports that take a filter and do things like count results.  Might be worth a look at the 2d filter statistics gadget for a starter.

0 votes
Mikael Sandberg
Community Champion
October 15, 2021

Hi @Anna Comer,

Welcome to Atlassian Community!

JQL is not SQL, so you cannot create a JQL that sums up the total. Instead you can use the Jira gadgets available in Confluence to show the numbers. 

Suggest an answer

Log in or Sign up to answer