how can I filter issues not in active sprint (i.e. in backlog) for my dashboard?

C B May 21, 2013

I have configured my JIRA dashboard to show my 'In Progress' issues and 'Assigned to me" issues. The 'Assigned to me' includes both issues from the current sprint, and issues that are in backlog. What I want to create is a filter for 'Active in sprint' and another for 'Waiting in backlog', so I can more quickly see what I should be working on next. I can't see any existing filter attributes that will allow this.

My current filter is this;

issuetype = Story AND status in (Open, Reopened) AND assignee in (currentUser())

Is there some attribute that would support something like;

issuetype = Story AND status in (Open, Reopened) AND assignee in (currentUser()) AND xxx in (Backlog)

8 answers

1 accepted

12 votes
Answer accepted
Timothy
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.
May 21, 2013

You can add "AND sprint is not EMPTY". Though the JQL will not tell you whether the Sprint is active or not.

EDIT: Oh wait, there is "sprint in openSprints()" that you can use.

C B May 21, 2013

"AND sprint is not EMPTY" didn't work as a couple issues that had been in a sprint, but were moved back to backlog still open when the spring closed, were still listed. "sprint in openSprints()" seems to work better. Thanks.

Alexandra Bondareva January 7, 2016

is sprint in openSprints()supposed to show issues from the backlog? For me it doesn't. I need to view issues only from the backlog for a specific component for the purposes of the backlog refinement.

Mike Sebastian June 6, 2019

Thank you!

11 votes
Martin Gregory July 24, 2013

I have found that to identify issues that are in the backlog, I have to say

sprint IS EMPTY OR sprint NOT IN openSprints()

That is to say sprint NOT IN openSprints() is not enough: it doesn't select issues that have no sprint field at all.

Pulkit Singhal February 11, 2017

Good one Martin. I used something slightly similar as well:

... AND (sprint is EMPTY or sprint in closedSprints()) ...

I used closedSprints() because if an issue wasn't finished in a previous sprint then that value is still present ... realized that the sprint field is more like a history/array.

Like # people like this
MarthaSimons November 3, 2017
... AND (sprint is EMPTY or sprint in closedSprints()) ...
Pratyush Sahay April 22, 2021

sprint IS EMPTY OR sprint NOT IN openSprints()

Worked well for me. Thanks. And the suggestion of closedSprints to count the ones in active as well is very useful too.

1 vote
Max Kloosterman June 7, 2016

Hi,

The statement below seems to work for me:

Sprint not in (opensprints(),futureSprints()) or sprint is EMPTY

In addition to an open sprit I have a number of futuresprints where we prepare the next sprints.

NB. the order of the arguments is important. If for example the statement sprint is empty is placed before sprint not in etc it renders an empty set.

Kind regards,

Max

MarthaSimons June 11, 2018

thanks smile2.png

1 vote
Vidic Florjan
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.
May 21, 2013

1. JQL for Backlog: With Script Runner plugin (by Jamie Echlin) installed you can try: issueFunction in inSprint("My board", "Backlog")

General Function: inSprint(board name, sprint name)
Finds issues in the given sprint. This works for sprints that are not yet started, active, and completed sprints. Instead of the sprint name, you can also use the string "Backlog".

https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-inSprint(boardname,sprintname)

2. JQL for open Sprints: sprint in openSprints() (as Timothy already mentioned)

Vidic Florjan
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.
May 21, 2013
Vidic Florjan
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.
May 21, 2013
C B May 21, 2013

I had developed my query initially in "Basic Mode", and switched to advanced mode to paste the query in my post. Now that I added the "sprint in openSprints()", JIRA tells me it's "too complex to display in Simple mode". Starting in Basic Mode had led me to believe the options were far more limited than they actually are.

Vidic Florjan
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.
May 22, 2013

>> Starting in Basic Mode had led me to believe the options were far more limited than they actually are.

Yes, that's true. Advanced mode is very powerful.

>> tells me it's "too complex to display in Simple mode".

More about switching between modes:

https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-switchingSwitchingbetween%27Advanced%27and%27Simple%27Search

In general, a query created using 'Simple Search' will be able to be translated to 'Advanced Search' (i.e. JQL), and back again.
However, a query created using 'Advanced Search' may not be able to be translated to 'Simple Search' (and in this case it is not possible).

On the other hand it is still not possible to create filter with something like 'Waiting in backlog' without additional plugin.

0 votes
Nicholas Tuck October 16, 2015

"sprint in futureSprints()" 

Not sure if openSprints changed and futureSprints was added but openSprints seemed to show the active one.

0 votes
Nathanael Coyne (Boehm) January 27, 2015

It kinda makes sense if you think about it, that if there is no value in the sprint field then it can't compare it against a list of sprints, although confusing. My filter now works by checking for issues that are neither in openSprint or empty as well as neither in closedSprint or empty … so that hopefully is returning all issues that may or may not be included in a sprint (but not a closed one and not the currently running one) and then I can check for those issues with no story points assigned to create a view showing all issues requiring story point estimation (excluding stories in sprints that have already started or are now closed).

0 votes
Michel Latournerie November 21, 2014

I use successfully the following JQL query to match what the backlog list shows in JIRA scum plan mode, assuming project is "PRJ" and current active sprint is "Sprint 6":

 

project = PRJ AND (Sprint != "Sprint 6" OR Sprint is EMPTY) AND status in ("Open","In Progress") AND type not in  (Sub-task,Epic) order by rank

 

0 votes
petry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2013

There is an opened Request for that here:

https://jira.atlassian.com/browse/GHS-6036

Suggest an answer

Log in or Sign up to answer