Introduction to JQL

Introduction to JQL

Jira is an issue and project tracking software that allow users to plan, manage and track software projects. There are two ways to search for an issue in Jira:

  • Basic search
  • Advanced search

Basic search is a simple search using search bat at the top of screen.

Jira search box

Advanced search allows users to use Jira Query Language (JQL) to search issues. A Jira query has three basic parts: field, value, and operator.

Field

Jira fields contain information of an issue in the system. The most common Jira fields are sprint, priority, labels, issuetype, status , and so on.

Value

Value is the actual data that we need to search.

Operator

Operator relates fields field to values. Most common operators are <, >, =, and so on.

JQL also include keywords and functions. Keywords are specific words in a language such as in, or, and, is, and so on. However, each function returns some value(s). Now, lets have a look at the most common Jira queries.

Examples of search issues

reporter = currentUser()

Using the above JQL query you can return all issues created by the logged in user. Here, currentUser() is a function that returns the logged in user's identity.

Search unassigned issues

assignee is EMPTY

Using the above JQL query you can return all issues that have not been assigned to anyone. Here EMPTY is a keyword.

Search all issues of a project

project = 'Project1'

Using the above JQL query you can return all issues of Project1.

Search all issues of a sprint

Sprint = 'Project1 Sprint 1'

Using the above JQL query you can return all issues of particular sprint.

Search unassigned issues

assignee is EMPTY

Using the above JQL query you can return all issues that have not been assigned to anyone. Here EMPTY is a keyword.

Search all critical issues in more than projects

priority in (Critical) AND project in (Project1, Project2, Project3)

Using the above JQL query you can return all critical issues of Project1, Project2 and Project3.

Search all issues assigned to me but not updated since yesterday

assignee is currentUser() AND updated >-1d

Using the above JQL query you can return all issues assigned to logged in user and have not been updated since yesterday. Here, -1d evaluates to 1 day before the current date.

Search all closed issues in a project

status = "Closed" AND project ='Project1'

Using the above JQL query you can return all closed issues of Project1.

Free Resources