Top 18 JQL Queries to Use Every Day

Learn some popular JQL queries

Would you like to learn one more language? Jira Query language (JQL) is a must for everyone who wants to search data in Jira effectively. If you master it, you will be kind of Sherlock. It can be more or less straightforward for experienced users and totally mystifying for those who are new to Jira. In this article, you will find some of the most frequently used and popular queries based on research from the Atlassian Community and cases shared by our users and team members.

Are you ready to discover Jira’s secrets and puzzling stories? 

Let’s kick off!

Date searches with JQL

With JQL, you can search for tasks created, updated, or resolved within a specific or relative date range. Here are some instances of date-related queries.

  1. Find issues that were created based on relative dates:

created >=-2w 

This query will return tickets created within the last 2 weeks. You can also change it for days (e.g., -5d).

jql created 2 weeks ago

2. Find issues resolved between specific dates:

resolved >= 2024-01-01 AND resolved <= 2024-02-01

This query will return issues resolved between January 1, 2024, and February 1, 2024.

Use the correct JQL syntax → yyyy-mm-dd (to set date) or yyyy-mm-dd hh:mm (to set date and time)

For “2024-01-01”, the system internally treats this as “2024-01-01 00:00:00”.

jql resolved

3. Find issues updated on a specific date (January 12, 2024):

updated >= 2024-01-12 AND updated <=2024-04-13

This query will show issues updated between 12 a.m. on the 12th of January and 12 a.m. on the 13th of May.

4. Find issues due between specific dates:

due > 2023-12-01 and due < 2024-01-01

This query will show issues that had due dates in December 2023.

JQL to find issues due dates

Status searches in Jira

5. Find issues in multiple statuses:

status IN (“Status1”, “Status2”, “Status3”)

For one particular status, put, for example, “status = In Progress”

jql status in

6. Find issues where the status changed from In Progress to Done after some date.

status CHANGED FROM “In Progress” TO “Done” AFTER 2024-01-01

7. Find the list of issues where the status was Done for a current assignee during the last month.

status WAS Done AND assignee WAS currentUser() AND updatedDate >= startOfMonth(-1) AND updatedDate <= endOfMonth(-1)

jql status assignee updated

Text searches with JQL

8. Find issues with the specified keyword in the summary, description, and comments.

text ~ “keyword”

If you are looking for incomplete word, for example “key” from the “keyword” in the summary, enter “summary ~ “key*”.

Text searches with JQL

9. Use double quotes to search for an exact phrase.

text ~ “\”exact phrase\””

jql phrase

10. Specify the field you want to search in.

summary ~ “keyword”

description ~ “keyword”

comment ~ “keyword”

jql summary

History searches with JQL

To search for updates that have been made in the past, you can use WAS or CHANGED operators. JQL works only for some fields with history changes, which include Assignee, Fix Version, Priority, Reporter, Resolution, and Status.

11. Find issues where the status was Done for some assignee during last year.

status WAS Done, and assignee WAS Jack DURING (“2022/01/01″,”2023/01/01”)

12. Find issues where priority changed from medium to low during the past 24 hours.

Priority CHANGED from Medium to Low DURING  (-1d, now())

13. Find issues updated by some users during the past two weeks.

issuekey IN updatedBy(“Jack”, “-2w”)) 

How about other fields that JQL doesn’t support? Updates may include sprints, issue types, summaries, comments, due dates, and more. To see changes to these or any fields you have, you can try alternative solutions like Issue History for Jira. It is a diary of changes, and with available filters, you can search for the items you need.

Example. Get the list of issues for the specific project with due date changes for the current week + updated by a specific user.

  1. Filter by project and select the required one from the list.
  2. Select the updater.
  3. Set the date range (given or custom) — for example, this week.
  4. Add the due date field to the columns of the grid.
How to view Due dates changes in Jira

JQL combinations

In this section, you will find examples of JQL combinations that can be helpful in different situations.

14. Find issues currently part of an open sprint but not planned for any future sprints.

Sprint in openSprints() AND Sprint not in futureSprints()

jql sprint

15. Find bugs specifically in the “Development” project that are either in the “To Do” or “In Progress” status.

project = Development and type = Bug and status in(“To Do”,”In Progress”)

jql issue type

16. Show tickets that changed status to CLOSED in the last 24 hours.

status= “Closed” and status CHANGED DURING (-1d, now())

JQL status changed during

17. Find issues in the “MyProject” project that were created within the last 10 days and is presenting them in descending order based on their creation date.

Project = MyProject AND created > startofday(-10) order by created DESC

jql created

18. Find issues where the assignee is a specific user, and the status has changed from “Open” to “In Progress” within the last week.

Assignee = NAME AND status CHANGED FROM “Open” TO “In Progress” AFTER -1w

jql status changed for assignee

Takeaway

JQL (Jira Query Language) query is used to search for issues in Atlassian’s Jira software based on certain criteria. Mastering it will help you retrieve specific information, filter out irrelevant data, and focus on what’s important. A real-time summary of project status, progress, and other metrics can be obtained by utilizing JQL queries.

If you need help with a specific query, do not hesitate to contact us. You can share your case in the comments or contact our team at [email protected].

Yuliia Borivets

The author of the article

I'm here for writing. I believe every word counts. Aiming to bring value with every single piece I draw up. Loving the Atlassian world and hope to make it closer and more helpful for you.

Find out more about the Issue History

Visit the app page for more information

Leave a Reply

Your email address will not be published. Required fields are marked *

Open Table of Contents