It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I need a JQL for my backlog items but excluding a certain label

I am currently cleaning the backlog and have tickets sitting with a label for review. I do however want to pull the rest of my backlog in a JQL so I can use Miro import to create a map. The problem is working through backlog queries I am not getting my magic number of items in the backlog. My query looks like this

(Project = Dev AND sprint is EMPTY AND Status != Done AND issuetype != Epic AND issuetype != Subtask And labels is EMPTY or Labels != Review) OR (project = _DEV AND sprint in closedSprints() AND sprint not in (openSprints(), futureSprints()) AND status != Done AND labels is EMPTY or Labels != Review)

The query itself is ugly and excludes subtask and epic, because even though I state it needs to be dev project the query breaks and pulls from my other boards as well. I just need from my dev environment. 

I know the quick and dirty fix is to just assign a label to backlog items and pull that unique label. But I should know how to get the items I want with JQL and without grunt working labels on. 


TLDR: I need backlog items (That are only tasks and stories) out of a single project(_Dev), minus a singular label(review).


1 answer

1 accepted

0 votes
Answer accepted

Hi @Dalton Crawford

Would something like this work?

Project = DEV and status != Done and issuetype in (Task, Story) and (labels is EMPTY or labels != Review) and (Sprint is empty or Sprint in closedSprints())

^ What I've done is:

  • Dropped to one query - based on your TLDR, you mentioned needing to see all Tasks and Stories so I've made this inclusive to both queries
  • Enclosed the OR statements - this is because it activates for all text after the OR - so the above example would be three different search queries - not one encased query considering all parameters.

I tried the negative searches here as well on my instance (eg Sprint not in openSprints()and Sprint not in futureSprints() in place of Sprint in closedSprints) and came up with the same numbers each way.


The return is only 7 tickets. I ended up going with the label to keep moving forward, but I want to understand this jql. 

Hi @Dalton Crawford

Sorry I pressed Reply a little early - see above for new answer.


This is closer, the only problem this has is that there was some rollover from past sprints. 

Some editing and I got to this 

Project = DEV and status not in (Done, "In Progress") and issuetype in (Task, Story) and (labels is EMPTY or labels != Review) and (Sprint is empty or Sprint not in opensprints())


and I got my magic number, and its correct. Thanks for your help @Ste 
I understand JQL a bit more. 

Awesome, glad I could help :)

I envisaged that the option you have could also include issues from Future Sprints - worth checking in case you need to limit the number further for future reference.


Like Dalton Crawford likes this

That makes sense, further implementation will probably have a necessity for that. 

Like Ste likes this

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you