How to query Backlog + How to display in same order as Backlog board

Carrie McMahon April 6, 2023

I'm trying to JQL query all items in our Backlog (in order to embed into Confluence). I've looked around and don't see anything straight-forward about this. Is there a specific field associated with the backlog that I can query? This query below actually worked, but it seems like there should be a simpler way to pull this.

project = *project name* AND issuetype in (Task, Bug, Story, Improvement, Enhancement) AND (sprint is EMPTY OR Sprint not in (openSprints(), futureSprints())) AND resolution = Unresolved and status != Closed

Also, we manually sort our issues in the Backlog - how can I have the embedded Backlog show in the same order across Jira and Confluence? 

2 answers

2 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

Welcome to the Atlassian Community!

The backlog for a board is based on the board filter.  Software boards can have variable filters that you can make quite complex, but others have a simple "project = X, order by rank" filter.

There's no specific field associated with a backlog, the backlog is just "the board filter + exclude done items"

To replicate a backlog filter, you need to look at the filter behind the board, and add a clause for "not in the done column".

So for a standard default board filter of

project = X order by rank

the backlog is simpley

project = X and status not in (a status mapped into the last column on the board) order by rank

 

Replace project = X with your actual board filter for more complex boards.

1 vote
Answer accepted
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

Hi, @Carrie McMahon - welcome to the Community!

The query you need is based entirely on how your backlog view is configured. For example, unless your project contains issuetypes that you don't display in your board, you don't need to include the issuetype clause in your search.

Do you frequently have issues that are in a status other than Backlog (or whatever your initial status is) that are not in an active sprint? In theory, your backlog (the actual Backlog section at the bottom, not just the Backlog view as opposed to the Active Sprint view) should only contain tickets that have not been assigned to a sprint, which means they should not have been started. If that's the case, you can leave out the resolution, and just search for status = Backlog (or Open, or whatever your first status is.)

Again, if you're only looking for truly backlog items, you can just use Sprint is Empty; no need to eliminate openSprints or futureSprints because if they have a sprint value, they're not truly backlog. 

So, here's an example. In my board, To Do is the first status, and I have epics set to display in the side panel rather than in the backlog. If I wanted to search for all items that fall under Backlog, here's how I'd do it.

2023-04-06 18_05_45-Mouse Highlight Overlay.png

To only give me the 9 issues under the true backlog plus any epics that are in To Do, here's my search:

2023-04-06 18_03_11-Mouse Highlight Overlay.png

As for sorting, if you're sorting your backlog via drag and drop, the field you're looking for is Rank. 

I just reordered my backlog this way:

2023-04-06 18_08_07-Mouse Highlight Overlay.png

Adding the order by Rank clause returns the search like this:

2023-04-06 18_07_48-Mouse Highlight Overlay.png

Hope this helps!

Carrie McMahon April 7, 2023

This really helped me understand the set up and what can actually be queried. Thanks so much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events