JQL stands for Jira Query Language and is the most powerful and flexible way to search Jira issues. JQL is also what Jira Snapshots are using 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
In Jira, define a search that retrieves exactly the set of issues you need.
Use Save as to save the search as a filter. Give the filter a meaningful name, such as “Open stories.”
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 as follows:
project=PKEY
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 JQLs:
project=PKEY AND resolution != Unresolved
All Issues in an Epic
All issues which belong to epic with key PKEY-1
"Epic Link"=PKEY-1
When using it in level 2 (or more), and wanting too filter for issues that belong to the epic in the previous level, then you need to:
The field key needs to be part of level 1 fields (as this is the linking field)
Use the following “snapshot extended” JQL
"Epic Link"=$key
All Subtasks of an Issue
All issues which belong to epic with key PKEY-2
parent in (PKEY-2)
When using it in level 2 (or more), and wanting too filter for issues that belong to the epic in the previous level, then you need to:
The field key needs to be part of level 1 fields (as this is the linking field)
Use the following “snapshot extended” JQL
parent in ($key)
How to Find the Userid String
In some cases, like when selecting only issues for which you have a logged time during the last week you will need to know your userid, because that’s how the JQL looks like:
worklogDate >= startOfWeek() and worklogAuthor = 557057:c0f3ae55-…….
Where 557057:c0f3ae55-……. is a placeholder for the complete userid.
To find the userid:
Jira → Filters → Advanced user search
Enter the JQL, using the actual user name, like this:
worklogDate >= startOfWeek() and worklogAuthor = rina.nir@radbee.com
Jira will automatically replace the user name with the user id → copy and paste the string from there