JQL: The most flexible way to search Jira

In the above example both diagrams have the same number of issues we care about (issues with A on them) but the first query isn’t specific enough. jql query Development managers often have to find areas of risk in their programs. Good queries often take a bit of refinement as they get developed.

  • You can then click on one of the suggested operators to continue building your JQL query.
  • You can filter on any field available in Jira (depending on the selected project(s)).
  • Here, we will explore advanced JQL best practices that can help you write efficient, maintainable, and effective queries.
  • In addition to temporal functions, there are also functions for people.
  • In the above example it will return all of the blocker and critical bugs in projects A, B, and C.

The query uses the issuetype field, the EQUALS operator, the value Bug,the AND keyword, the component field, and the IN operator. It uses the project field, the EQUALS operator, and the value TEST. This ensures that everyone understands what a specific filter does. And avoids other users creating duplicate filters if they’ve missed the point of an already existing filter. If you find yourself needing to search the same query on a regular basis, you can save it for later use.

Saving JQL Filters

The value -1d evaluates to 1 day behind the current date when the query is run. As a result, the above query will return all issues that do not have an assignee that are at least one day old. Functions are special instructions that can be used in JQL queries to search for issues in a more dynamic or complex way. When searching JIRA, it’s easy to perform searches that return too many issues.

The REST endpoint for search returns structured JSON data that’s easy to process and manipulate. You can create custom widgets based on JQL searches and display them on your dashboard, making it easier to track and monitor your work across projects. If your site has 10,000 issues Jira can look at the 500 issues in those projects and can ignore the remaining 9,500. Fewer issues to sort through, the quicker the query can run, even though the results are the same. This will return all of the issues that were fixed in that particular release. What if we want a list that always shows the issues fixed in the last release whenever it was run?

Scoping and sorting

JQL, or Jira Query Language, is a flexible tool that allows you to search for issues in Jira and pinpoint exactly what you are looking for. Visit the Jira product guide to learn more about JQL, advanced search with use cases, and more. The fields you can use in your JQL queries will depend on your Jira configuration and the specific fields available in your instance. Once the query is complete, JIRA validates the JQL and lets us know the syntax is correct by the green check in the left and side of the text entry box. Note the Syntax Help link, which opens a reference page to the JQL language. Often times you may want to have the query reference a set of items.

what are JQL queries

JQL (Jira Query Language) is a powerful tool which allows you to base your search on criteria that you can’t specify in the basic search. The basic search provides the possibility to do this search with the dropdown menu but sometimes it reaches its limit. In this case, you can switch to advanced search which offers you tons of possibilities for special search functions. This article is intended to be a practical guide for anyone working with Jira, regardless of experience. If you’d like to see the operations described below in action, go ahead and check out our video tutorial. Advanced search allows you to build structured queries using Jira Query Language (JQL) to search for issues within and across projects.

C. Using Saved Filters

Query results can be saved and used as filters and views across Jira (including boards). Here you can find a brief overview of Jira fields, operators, keywords, and functions used to compose JQL queries. For detailed description   and examples of their usage for advance searching, check the links from the Reference column.

what are JQL queries

Use the blue bar at the top and click Issues→ Search for issues to get to the issue navigator. I’ve added +2 to the endOfDay() function because I needed to find out what is due in two days. Whereas the JQL function on its own would return only what is due at the end of the current day.

project in (LIFE) AND team = bugfix AND issuetype = bug AND (fixVersion in unreleasedVersions() OR fixVersion is empty)

Moreover, Jira filters can be embedded into Confluence pages, making it easy to share the insights from your JQL queries with your entire organization. Functions are powerful because they can react dynamically as the environment changes. If users are added to the test-engineering group, this query will start including issues assigned to the new members. It’s a more flexible solution than using assignee in (user1, user2, user3).

Now running JQL searches 33% faster than Jira 7.12 and almost entirely eliminating memory issues previously faced when making complex searches. Power users who employ Jira on a daily basis may already have a grasp of the Jira query language. But effective query writing skills can also be quite helpful to other members of the team. The “in” keyword will include any item that matches any item in the list. JIRA has a stable REST API to access issues that lets you use the same JQL you do in the UI.

We also have a downloadable cheat sheet to keep close on hand as you perform searches with JQL. Copy and paste fields, operators and functions into the Jira search bar, as well as learn more advanced queries. In all the queries we’ve discussed so far, the data is reflective of the current time the query was run. But values for fields like assignee, priority, fix version, and status often change over the course of an issue’s lifecycle. JIRA stores each update an issue goes through, known as an issue’s change history. This query will find all issues in the TEST project where the assignee is the currently logged in user.

If more users are added to the test-engineering group, this query will dynamically update. Jira Query Language (JQL) is a versatile and powerful tool that allows users to create sophisticated queries to find issues in Jira. To get the most out of JQL, it’s important to follow some best practices. Here, we will explore advanced JQL best practices that can help you write efficient, maintainable, and effective queries. As you can see in this example, parentheses can turn our example JQL query around. This query would return resolved issues that either belong to the Teams in Space project or are assigned to captainjoe.

D. Sharing Your JQL Queries

They’re essentially what you’re looking for in relation to your fields. With Advanced Searching, you’ll be forming your own JQL queries. Jira Query Language (or JQL) is one of the most powerful tools available in Jira. Knowing how to search your Jira instance effectively can literally save you hours of work. The most simple search feature in Jira is the search box at the top right of your screen.

what are JQL queries

Leave a Comment

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

Shopping Cart