Parentheses will group certain clauses together and enforce precedence. When you only use the OR keyword, all clauses will be treated as separate, and equal in terms of precedence. UpdatedBy() is a function which allows you to find all the issues that have been updated by a certain user (whose name is specified in brackets).
- All queries are made up of fields, operators, values, and keywords.
- In this example the person filing the bug is stored in the reporter field.
- A number of JQL fields are particularly useful for project tracking.
- When you see the value you’d like to select, you can use the arrow keys or mouse to select it.
- If more users are added to the test-engineering group, this query will dynamically update.
These words need to be surrounded by quotation marks (single or double) if you wish to use them in queries. We have covered some of the commands in the Advanced JQL search mode. For more information, check out the official Atlassian documentation. If you are looking for assignees who belong to a certain group, you can use membersOf() and specify the group name in brackets. Once you end up with several filters, it’s important to use a consistent naming nomenclature.
Use Descriptive Names for Saved Filters
What the sorting does is show us the most recent issues first. Use the DESC keyword to sort in reverse (newest to oldest). That way you focus your audience on the most important issues first.
Remember, the best way to learn JQL is by trying it out yourself. So, don’t be afraid to experiment with different queries and see what results you get. The more you practice, the more comfortable you’ll become with JQL.
JQL Add-Ons
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).
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.
Understanding the Basics
Always sort your queries so that the most important issues show up first. Jira will first order the list by priority and then sort by assignee for all of the issues with the same priority. Let’s look at another example examining the incoming bugs to our project. We want to see any new critical or blocking bugs that have come in recently to see if recent checkins have decreased stability. To run a filter, such as New_issues, select the filter name. The JQL for the advanced search will be set, and the search results will be displayed.
Break down complex queries into simpler saved filters and combine them. Using search in Jira can help you gain key project insights and answer questions that are relevant to the team. The three flavors of search in Jira — quick, basic, and advanced — can help you find important information about your projects.
A JQL Tutorial: Putting it All Together
Generally speaking, AND will narrow your query and return fewer results, while using an OR broadens it and will return more results. The query states that the company must be Acme, the item must be a cookie, and the quantity needs to be three. Since we want items that meet all three criteria, we use the keyword “AND”, which means that the conditions to the left and right of AND have to be met. You can also use OR, which means that only one of the conditions needs to be met.
Typing “AND” in your query will return issues that match both conditions of your search. In the above search, you’re searching for issues with an Epic Name (field) that is equal to (operator) “Audio Development” (value). A field is a piece of information that describes issues – this is what you fill in when you use basic searches. All queries are made up of fields, operators, values, and keywords. You can also share your queries and filters with other team members. Sharing filters allows others to use the same set of criteria to view issues.
Suggestions and bugs
Jira JQL functions are especially powerful when combined with the other elements of JQL. They are always represented as a word followed by parentheses containing fields or values. You can view a list jql query of all fields in Jira’s documentation. You can filter on any field available in Jira (depending on the selected project(s)). You can also search issues from the “Issues” section in the dropdown menu.
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.
More in Jira
Here, you can combine multiple fields, operators, and values using an intuitive dropdown system. The page also provides auto-complete suggestions, helping you avoid syntax errors and construct your queries more easily. Why is JQL so crucial in the Jira ecosystem, you might ask? JQL gives you the power to create custom search filters, which dramatically streamlines the project management process. With JQL, you can pinpoint specific tasks, monitor the progress of a project, generate detailed reports, and so much more.