The adaptable Jira Query Language, or JQL, makes it possible to find precisely what you’re looking for when searching for issues in Jira.
You can literally save hours of time by conducting an efficient search of your jql instance.
Power users who utilize Jira on a daily basis.
On the other hand, having excellent query writing skills can be extremely beneficial to other team members.
Most of the time, non-technical Jira users don’t use JQL to its full potential. Employees who aren’t as accustomed to technology may be scared by operators and keywords. When I first started using Jira, I was definitely not familiar with it!
However, this tool’s design was intended to be universally applicable. If presented correctly, even non-technical users can get the hang of it. You can, for instance, just type “r:”or enter “my” into the search bar to find all issues assigned to you. or enter “me” to discover that everything you said was incorrect. And this is only the beginning!
We will go over all of the fundamental concepts you need to know to be an expert Jira searcher and master JQL in this guide.
Which is JQL?
One of Jira’s best tools is the JQL, or Jira Query Language.
The system filters issues using the following data: And, as a consequence, makes it simpler to locate the information you require:
Keywords, Operators, Values, Fields, and Functions For example, if you wanted to find all unplanned issues, you could look for problems with status fields that aren’t closed and empty fields for epic links and fix versions.
Or, suppose you needed to figure out if your project has a problem with its scope. You could limit your search to problems that were originally assigned to a different sprint but haven’t been solved yet. This would inform you of the number of issues that were beyond the scope of the previous sprint and could not be resolved.
JQL searches now run 33% faster than Jira 7.12 searches
Overview of the Jira Query Language Interface Select “Search for Issues” from the “Issues” drop-down menu.
As a result, the Jira Query Language Interface search screen will open. On this screen, the basic search tool opens by default. It can be used to filter issues using predefined fields like:
Status Assignee Project Has Text The “Advanced” option is right next to the filters:
You will have access to Jira JQL here.
The Basic and Advanced Search Options in Jira Basic searches are useful to a certain extent. They are simple to use and quick to fill out.
However, you will quickly reach the limits of the existing forms as they restrict you.
Develop your own JQL queries when using Advanced Searching.
How to Dissect a JQL Query A JQL query is a collection of words and operators that tell Jira how far down your search will go.
The queries for basic searches have already been made for you. However, utilizing them in JQL will require a fresh start.
Keywords, fields, operators, and values make up every query.
In the Jira Query Language, a field is a piece of information that describes problems. When you conduct basic searches, these fields are filled in for you.
In Jira, examples of fields include:
Issue type Project priority Fix version Epic tag All fields are listed in Jira’s documentation.
Your queries’ data points are referred to as values in the Jira Query Language.
In essence, they satisfy your requirements in your respective fields.
The Priority field, for instance, might have one of the following values:
Equals (=) and does not equal (!) are the mathematical signs are Jira Query Language operators like =), less than or equal to (=), greater than (>), and so on.
They discuss the connection between your field and your value.
For instance:
JQL operators In the previous search, you were looking for problems with the Epic Name (field) and value that are the same as the operator “Audio Development.”
Another useful feature is the ability to simplify queries made possible by “IN. Instead of running multiple status queries, you can use, for example, the following:
“CONTAINS” is a powerful operator that lets you use the “Free Text Searcher” to query custom fields in addition to the Environment, Comments, Summary, and Description fields.
On the other hand, “WAS” allows you to access anything that was previously associated with a particular state but is no longer, such as:
WAS Francis You may also make use of the terms “WAS,” “WAS NOT,” “WAS IN,” and “WAS NOT IN” as required.
The Jira Query Language’s Keywords The JQL language is made up of keywords.
The search is further narrowed by the specific meaning of each keyword, such as “AND” and “OR.”
When you type “AND” into your query, issues that satisfy both of your search conditions will be returned.
For instance, this search will return all issues with a “To Do” status and a high current priority:
Keywords for JQL, on the other hand, the operator “OR” will return any issues that satisfy either of your requirements.
Using an “OR” keyword would yield the same outcomes as before:
all issues with a “To Do” status, a high priority, or both of these conditions.
A Guide to JQL: Now that you are familiar with the fundamentals, let’s look at a JQL example in Jira.
A search bar without pre-made filters will appear when you click “Advanced Search.”
With a green checkmark on the left, Jira will indicate whether your query is valid as you type it. If you see a red X, your search is invalid:
JQL Tutorial You can always click the question mark to the right of the search box
The fact that Jira JQL will auto-suggest as you type is extremely helpful. Even if you don’t know the syntax by heart, you can still get it right this way.
For instance, let’s say that we begin our query by looking in the “Priority” field. You can use the search box to type “Priority. JQL will also automatically recommend the following course of action:an employee illustration from the JQL Tutorial You can then construct your JQL query by selecting one of the suggested operators.
Let’s say we want to locate all urgent issues that have not been resolved within a specific Epic link in this example. The Jira Query Language uses AND in this example.
This is how your query would look:
In JQL, AND:Let’s look at each part of this question one at a time to see how it relates to what we already know.
to STAN-5:The value of the “Epic Name” field A JQL example for the keyword “OR” What if you want to see both high-priority and urgent issues that have not been resolved for a specific Epic?
Let’s use “OR” to run the same query this time:
JQL with OR The rest of the query remains unchanged, with the exception of the addition of the “OR” keyword and a query for issues with a high priority.
However, in JQL, “AND” takes precedence whenever both “AND” and “OR” keywords are used. This indicates that two clauses will be treated as a single unit and grouped together if they are connected by “AND. However, if two clauses are linked by “OR,” they will be considered distinct clauses. That entails:
Advanced search functions for Jira JQL: You can do a lot with fields, values, operators, and keywords. However, functions are necessary if you want to quickly access complex logic.
A function is a pre-made command that can be added to a query to return a specific set of values.
Always displayed as fields or values enclosed by parentheses.
The linkedIssues() function, for instance, can be utilized to locate all issues that are interconnected:
JQL functions for more in-depth searches The value enclosed in parentheses indicates the subject matter for which links are sought.
Each JQL function does not need to have a value in the parentheses. For instance, to determine which issues are associated with a completed sprint, type in the following:
in closedSprints(), sprint;
When used in conjunction with the other JQL components, the functions of Jira JQL are especially efficient.
If I wanted to identify which urgent issues are due in two days in a particular project (like writing this article) and assigned to a specific user (me), the endOfDay() function would be helpful here.