Jira JQL Cheat Sheet

JQL stands for Jira Query Language and is the most powerful and flexible way to search Jira issues. JQL is also what Jira Snapshots uses to fetch data from Jira.

If you have not yet worked with JQL, fear not. Read this to get going quickly.

JQL Life Hacks

Use a Jira Filter

  1. In Jira, define a search that retrieves exactly the set of issues you need.

  2. Use Save as to save the search as a filter. Give the filter a meaningful name, such as "Open stories."

  3. Use this JQL inside the Jira snapshot macro: filter="Open stories"

All Issues in a Project

For all issues in a project named "Space ship," with project key PKEY, use any of these JQLs inside the Jira snapshots macro:

  1. project=PKEY

  2. project="Space ship"

All Open Issues in a Project

Typically, open issues in Jira will be those for which the "Resolution" field is not set. For a project named "Space ship," with project key PKEY, use this JQL:

project=PKEY AND resolution != Unresolved

All Issues in an Epic

All issues which belong to an epic with key PKEY-1:

"Epic Link"=PKEY-1

When using it in level 2 (or more), and wanting to filter for issues that belong to the epic in the previous level, you need to:

  1. Make sure the field key is part of level 1 fields (as this is the linking field).

  2. Use the following "snapshot extended" JQL:

"Epic Link"=$key

All Subtasks of an Issue

All issues which belong to a parent with key PKEY-2:

parent in (PKEY-2)

When using it in level 2 (or more), and wanting to filter for issues that belong to the issue in the previous level, you need to:

  1. Make sure the field key is part of level 1 fields (as this is the linking field).

  2. Use the following "snapshot extended" JQL:

parent in ($key)

Issues Created This Week

JQL supports relative time. Like this:

created >= startOfWeek() 

How to Find the User ID String

In some cases, like when selecting only issues for which you have logged time during the last week, you will need to know your user ID, because that's how the JQL looks like:

worklogDate >= startOfWeek() and worklogAuthor = 557057:c0f3ae55-…….

Where 557057:c0f3ae55-……. is a placeholder for the complete user ID.

To find the user ID:

  1. Jira → Filters → Advanced user search.

  2. Enter the JQL, using the actual user name, like this:

    worklogDate >= startOfWeek() and worklogAuthor = rina.nir@radbee.com
    
  3. Jira will automatically replace the user name with the user ID. Copy and paste the string from there.