Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwonrails/e04693b47cfa3c934a139b842043e543 to your computer and use it in GitHub Desktop.
Save cwonrails/e04693b47cfa3c934a139b842043e543 to your computer and use it in GitHub Desktop.
JQL Syntax for the Impatient

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates

JQL Basic Filters

Here are a few of the basic filters I could not live without.

Specific sprint (type slowly and JIRA will suggest sprint numbers)

project = ABCD
AND Sprint = 833 ORDER BY Rank

Closed this Week (awesome for weekly reports! put this on your dashboard!)

project = ABCD
AND status = Closed AND resolved >= -1w ORDER BY updated DESC

Want to download and sort your backlog in a spreadsheet? Here’s your JQL!

project = ABCD
AND status not in (Closed, Resolved) 
AND (sprint is EMPTY OR sprint not in openSprints())

Open Epics

project = ABCD
AND type = Epic AND status != Closed

Issues tagged XXX (in this case, “easywin”). I made one of these filters for each of my controlled vocabulary.

project = ABCD
AND status not in (Closed, Resolved) 
AND Labels = easywin ORDER BY Rank

Open + Backlog (I use this as the starting point for my work / plan board -- you need to include the Epics so that they show up on the left column on the “plan” view. It took me a while to figure that out. The default that comes with your board includes closed issues. WHY?! THEY’RE CLOSED!)

project = ABCD
AND status not in (Closed, Resolved) ORDER BY Rank ASC

Open Tickets Without Epics

project = ABCD
AND status not in (Closed, Done, Resolved) 
AND "Epic Link" is EMPTY AND type != Epic

JQL Advanced Filters

You can do fancy shit too.

Tickets created during the pilot window which have been closed which did not get dev attention (Duplicate, Won't Fix, Incomplete definition).

project = ABCD
AND created >= "2015/02/23 00:00" 
AND Resolution not in (Fixed, Done) 
AND status in (Resolved, Closed) ORDER BY updated DESC

All new tickets opened during the pilot window (includes duplicates, and incomplete tickets reported through the JIRA public feedback form).

project = ABCD
AND created >= "2015/02/23 00:00" 
AND created <= "2015/03/06 00:00" ORDER BY updated DESC

Tickets which were closed during the pilot window (regardless of when they were created).

project = ABCD
AND resolved >= "2015/02/23 00:00" 
AND resolved <= "2015/03/06 00:00" ORDER BY updated DESC

Tickets that were opened during the a specific window AND resolved during this time.

project = ABCD
AND created >= "2015/02/23 00:00" 
AND resolved <= "2015/03/06 00:00" ORDER BY updated DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment