JQL functions
We're updating terminology in Jira and changing 'issue' to 'work item'. As part of the change, there are no changes to existing JQL queries.
This page describes information about functions that are used for advanced searching. Additional JQL functions may also be available through installed apps.
A function in JQL appears as a word followed by parentheses, which may contain one or more explicit values or Jira fields. In a clause, a function is preceded by an operator, which in turn is preceded by a field. A function performs a calculation on either specific Jira data or the function's content in parentheses, such that only true results are retrieved by the function, and then again by the clause in which the function is used.
Unless specified in the search query, note that JQL searches do not return empty fields in results. To include empty fields (e.g. unassigned work items) when searching for work items that are not assigned to the current user, you would enter (assignee != currentUser() OR assignee is EMPTY) to include unassigned work items in the list of results.
approved()
Only applicable for sites with Jira Service Management subscriptions.
Search for all requests that have an approval with a final decision of approved.
Syntax | approved() |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
approver()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests where any specified user is an approver for a pending or completed approval step, and may or may not have already approved or declined the approval. You must specify a username.
Syntax | approver(user1, user2) |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
breached()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that whose most recent SLA has missed its goal.
Syntax | breached() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
cascadeOption()
Search for work items that match the selected values of a Cascading Select custom field.
The parentOption
parameter matches against the first tier of options in the cascading select field.
The childOption
parameter matches against the second tier of options in the cascading select field, and is optional.
The keyword none
can be used to search for work items where either or both of the options have no value.
Syntax | cascadeOption(parentOption)
cascadeOption(parentOption,childOption) |
---|---|
Supported fields | Custom fields of type Cascading Select |
Supported operators |
|
Unsupported operators |
|
Examples |
|
choiceOption()
Search for work items that match the selected IDs of a Multiple Choice or Dropdown custom field.
Requires at least one argument. For multiple arguments, returns the ID of each one. Arguments must be valid option values. In cases where the argument could be both an ID and the option value, returns work items where the option value matches.
Syntax | choiceOption(ValueOption)
choiceOption(ValueOption1,ValueOption2,ValueOption3) |
---|---|
Supported fields | Custom fields of types Multiple Choice and Dropdown |
Supported operators |
|
Unsupported operators |
|
Examples |
|
closedSprints()
Search for work items that are assigned to a completed Sprint.
It is possible for a work item to belong to both a completed Sprint(s) and an incomplete Sprint(s). See also openSprints().
Syntax | closedSprints() |
---|---|
Supported fields | Sprint |
Supported operators |
|
Unsupported operators |
|
Examples |
|
completed()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that have an SLA that has completed at least one cycle.
Syntax | completed() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
componentsLeadByUser()
Find work items in components that are led by a specific user. You can optionally specify a user, or if the user is omitted, the current user (i.e. you) will be used.
If you are not logged in to Jira, a user must be specified.
Syntax | componentsLeadByUser()
componentsLeadByUser(username) |
---|---|
Supported fields | Component |
Supported operators |
|
Unsupported operators |
|
Examples |
|
currentLogin()
Perform searches based on the time at which the current user's session began. See also lastLogin().
Syntax | currentLogin() |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
* Only in predicate |
Unsupported operators |
|
Examples |
|
currentUser()
Perform searches based on the currently logged-in user.
This function can only be used by logged-in users. So if you are creating a saved filter that you expect to be used by anonymous users, do not use this function.
Syntax | currentUser() |
---|---|
Supported fields | Assignee, Reporter, Voter, Watcher, Creator, custom fields of type User |
Supported operators |
|
Unsupported operators |
|
Examples |
|
customerDetail()
Perform searches based on the customers details.
To use this JQL function, turn on Customer service management on the Features page in Project settings.
This function will return up to 32000 customers.
Syntax | customerDetail() |
---|---|
Supported fields | Assignee, Reporter, Voter, Watcher, custom fields of type User |
Supported operators |
|
Unsupported operators |
|
Examples |
|
earliestUnreleasedVersion()
Perform searches based on the earliest unreleased version in a project. See also unreleasedVersions().
Version order is determined by the order versions are placed in on the Releases page in the project. The version at the bottom of the list is considered the "earliest." To change the order of versions, drag and drop them to a new place in the list.
Syntax | earliestUnreleasedVersion(project) |
---|---|
Supported fields | AffectedVersion, FixVersion, custom fields of type Version |
Supported operators |
|
Unsupported operators |
|
Examples |
|
endOfDay()
Perform searches based on the end of the current day.
See also endOfWeek(), endOfMonth(), endOfYear(), startOfDay(), startOfWeek(), startOfMonth(), and startOfYear().
Syntax | endOfDay()
endOfDay("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
endOfMonth()
Perform searches based on the end of the current month.
See also endOfDay(), endOfWeek(), endOfYear(), startOfDay(), startOfWeek(), startOfMonth(), and startOfYear().
Syntax | endOfMonth()
endOfMonth("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
endOfWeek()
Search for work items that are due by the end of the last day of the current week. By default, this function considers Saturday to be the last day of the week. You can use a different day (for example, Sunday) as the end of the week. See the syntax in the examples mentioned below.
See also endOfDay(), endOfMonth(), endOfYear(), startOfDay(), startOfWeek(), startOfMonth(), and startOfYear().
Syntax | endOfWeek()
endOfWeek("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
endOfYear()
Perform searches based on the end of the current year.
See also endOfDay(), endOfWeek(), endOfMonth(), startOfDay(), startOfWeek(), startOfMonth(), and startOfYear().
Syntax | endOfYear()
endOfYear("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
entitlementDetail()
Only applicable for sites with Jira Service Management subscriptions.
Perform searches based on the entitlement’s details.
To use this JQL function, turn on Customer service management and Products and entitlements on the Features page in Project settings.
This function will return up to 32,000 entitlements.
Syntax | entitlementDetail("Field Name", "Field Value") |
---|---|
Supported fields | Entitlement |
Supported operators |
|
Unsupported operators |
|
Examples |
|
entitlementProduct()
Only applicable for sites with Jira Service Management subscriptions.
Perform searches based on a product.
To use this JQL function, turn on Customer service management and Products and entitlements on the Features page in Project settings.
Syntax | entitlementProduct("Product Name") |
---|---|
Supported fields | Entitlement |
Supported operators |
|
Unsupported operators |
|
Examples |
|
everBreached()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that have missed one of their SLA goals.
Syntax | everBreached() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
futureSprints()
Search for work items that are assigned to a sprint that hasn't been started yet.
It is possible for work items to belong to both a completed sprint(s) and an incomplete sprint(s).
Syntax | futureSprints() |
---|---|
Supported fields | Sprint |
Supported operators |
|
Unsupported operators |
|
Examples |
|
workItemHistory()
Find work items that you have recently viewed, i.e. work items that are in the 'Recent work' section of the 'Work items' dropdown menu.
workItemHistory()
returns up to 50 work items, whereas the 'Recent work' dropdown returns only 5.
If you are not logged in to Jira, only work items from your current browser session will be included.
Syntax | workItemHistory() |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
workItemsWithRemoteLinksByGlobalId()
Perform searches based on work items that are associated with remote links that have any of the specified global IDs.
This function accepts 1 to 100 globalIds. Specifying 0 or more than 100 globalIds will result in errors.
Syntax | workItemsWithRemoteLinksByGlobalId(globalId) |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
lastLogin()
Perform searches based on the time at which the current user's previous session began. See also currentLogin().
Syntax | lastLogin() |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
* Only in predicate |
Unsupported operators |
|
Examples |
|
latestReleasedVersion()
Perform searches based on the latest released version (i.e. the most recent version that has been released) of a specified project. See also releasedVersions().
The "latest" is determined by the ordering assigned to the versions, not by actual Version Due Dates.
Syntax | latestReleasedVersion(project) |
---|---|
Supported fields | AffectedVersion, FixVersion, custom fields of type Version |
Supported operators |
|
Unsupported operators |
|
Examples |
|
linkedWorkItem
Searches for epics and subtasks. If the work item is not an epic, the search returns all subtasks for the work item.
Only applicable for company-managed projects.
Syntax | linkedworkIt = workItemKey |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
linkedWorkItems()
Searches for work items that are linked to a work item. You can restrict the search to links of a particular type.
Syntax | linkedWorkItems(workItemKey)
linkedWorkItems(workItemKey,CaseSensitiveLinkType)
linkedWorkItems(workItemKey,CaseSensitiveLinkType, CaseSensitiveLinkType) |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
membersOf()
Perform searches based on the members of a particular group.
Syntax | membersOf(Group) |
---|---|
Supported fields | Assignee, Reporter, Voter, Watcher, Creator, custom fields of type User |
Supported operators |
|
Unsupported operators |
|
Examples |
|
myApproval()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests where the current user is the approver for a pending or completed approval step, and may or may not have already approved or declined the request.
Syntax | myApproval() |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
myPendingApproval()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests where the current user is the approver for a pending approval step and is yet to approve or decline the approval.
Syntax | myPendingApproval() |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
myPending()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests where the current user is the approver for a pending approval step, and may or may not have already approved or declined the approval.
Syntax | myPending() |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
now()
Perform searches based on the current time.
Syntax | now() |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
* Only in predicate |
Unsupported operators |
|
Examples |
|
openSprints()
Search for work items that are assigned to a sprint that was started, but has not yet been completed.
It is possible for a work item to belong to both a completed sprint(s) and an incomplete sprint(s). See also closedSprints().
Syntax | openSprints() |
---|---|
Supported fields | Sprint |
Supported operators |
|
Unsupported operators |
|
Examples |
|
organizationDetail()
Perform searches based on the organization details.
To use this JQL function, turn on Customer service management on the Features page in Project settings.
This function will return up to 32,000 organizations.
Syntax | organizationDetail("Field Name", "Field Value") |
---|---|
Supported fields | Organizations |
Supported operators |
|
Unsupported operators |
|
Examples |
|
organizationMembers()
Only applicable for sites with Jira Service Management subscriptions.
Search for all requests sent by the members of an organization. Returns requests that the members have shared with or kept private from that organization, and with any other organizations they're a member of.
Syntax | organizationMembers() |
---|---|
Supported fields | Assignee, Reporter, Voter, Watcher, custom fields of type User |
Supported operators |
|
Unsupported operators |
|
Examples |
|
parentEpic
Only applicable for company-managed projects.
Search for work items and subtasks that are linked to an epic.
Syntax | parentEpic = workItemkey |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
paused()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that have an SLA that is paused due to a condition.
To find work items that are paused because they are outside calendar hours, use withinCalendarHours().
Syntax | paused() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
pending()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests with a pending approval step.
Syntax | pending() |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
pendingBy()
Only applicable for sites with Jira Service Management subscriptions.
Search for requests where any specified user is an approver for a pending approval step, and may or may not have already approved or declined the request. You must specify a username.
Syntax | pendingBy(user1, user2) |
---|---|
Supported fields | Custom fields of type Approval |
Supported operators |
|
Unsupported operators |
|
Examples |
|
projectsLeadByUser()
Find work items in projects that are led by a specific user. You can optionally specify a user, or if the user is omitted, the current user will be used.
Note that if you are not logged in to Jira, a user must be specified.
Syntax | projectsLeadByUser()
projectsLeadByUser(username) |
---|---|
Supported fields | Project |
Supported operators |
|
Unsupported operators |
|
Examples |
|
projectsWhereUserHasPermission()
Find work items in projects where you have a specific permission. Note, this function operates at the project level. This means that if a permission (e.g. "Edit work items") is granted to the reporter of work items in a project, then you may see some work items returned where you are not the reporter, and therefore don't have the permission specified.
This function is only available if you are logged in to Jira.
Syntax | projectsWhereUserHasPermission(permission) For the |
---|---|
Supported fields | Project |
Supported operators |
|
Unsupported operators |
|
Examples |
|
projectsWhereUserHasRole()
Find work items in projects where you have a specific role.
This function is only available if you are logged in to Jira.
Syntax | projectsWhereUserHasRole(rolename) |
---|---|
Supported fields | Project |
Supported operators |
|
Unsupported operators |
|
Examples |
|
releasedVersions()
Perform searches based on the released versions (i.e. versions that your Jira administrator has released) of a specified project. You can also search on the released versions of all projects, by omitting the project
parameter. See also latestReleasedVersion().
Syntax | releasedVersions()
releasedVersions(project) |
---|---|
Supported fields | AffectedVersion, FixVersion, custom fields of type Version |
Supported operators |
|
Unsupported operators |
|
Examples |
|
remaining()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items whose SLA clock is at a certain point relative to the goal.
Syntax | remaining() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
running()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that have an SLA that is running, regardless of the calendar.
To find work items that are running based on calendar hours, use withinCalendarHours().
Syntax | running() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
standardWorkTypes()
Perform searches based on "standard" work types, that is, search for work items that are not subtasks. See also subtaskWorkTypes().
Syntax | standardWorkTypes() |
---|---|
Supported fields | Type |
Supported operators |
|
Unsupported operators |
|
Examples |
|
startOfDay()
Perform searches based on the start of the current day.
See also startOfWeek(), startOfMonth(), startOfYear(), endOfDay(), endOfWeek(), endOfMonth() and endOfYear().
Syntax | startOfDay()
startOfDay("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
startOfMonth()
Perform searches based on the start of the current month.
See also startOfDay(), startOfWeek() startOfYear(), endOfDay(), endOfWeek(), endOfMonth() and endOfYear().
Syntax | startOfMonth()
startOfMonth("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
startOfWeek()
Search for new work items created since the start of the first day of the current week. By default, this function considers Sunday to be the first day of the week when ISO8601 for the Date Picker is disabled in Look and feel settings. You can use a different day (for example, Monday) as the start of the week.
See also startOfDay(), startOfMonth(), startOfYear(), endOfDay(), endOfWeek(), endOfMonth() and endOfYear().
Syntax | startOfWeek()
startOfWeek("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
startOfYear()
Perform searches based on the start of the current year.
See also startOfDay(), startOfWeek(), startOfMonth(), endOfDay(), endOfWeek(), endOfMonth() and endOfYear().
Syntax | startOfYear()
startOfYear("inc") where |
---|---|
Supported fields | Created, Due, Resolved, Updated, custom fields of type Date/Time |
Supported operators |
|
Unsupported operators |
|
Examples |
|
subtaskWorkTypes()
Perform searches based on work items that are sub-tasks. See also standardWorkTypes().
Syntax | subtaskWorkTypes() |
---|---|
Supported fields | Type |
Supported operators |
|
Unsupported operators |
|
Examples |
|
unreleasedVersions()
Perform searches based on the unreleased versions (i.e. versions that your Jira administrator has not yet released) of a specified project. You can also search on the unreleased versions of all projects, by omitting the project
parameter. See also earliestUnreleasedVersion().
Syntax | unreleasedVersions()
unreleasedVersions(project) |
---|---|
Supported fields | AffectedVersion, FixVersion, custom fields of type Version |
Supported operators |
|
Unsupported operators |
|
Examples |
|
updatedBy()
Search for work items that were updated by a specific user, optionally within the specified time range. An update, in this case, includes creating a work item, updating any of the issue's fields, creating or deleting a comment, or editing a comment (only the last edit).
This function will return up to 32,000 work item IDs.
For the time range, use one of the following formats:
"yyyy/MM/dd"
"yyyy-MM-dd"
Or use "w"
(weeks), or "d"
(days) to specify a date relative to the current time. Unlike some other functions, updatedBy
doesn't support values smaller than a day, and will always round them up to 1 day.
Syntax | updatedBy(user)
updatedBy(user, dateFrom)
updatedBy(user, dateFrom, dateTo) |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
votedWorkItems()
Perform searches based on work itemss for which you have voted. Also, see the Voter field. Note, this function can only be used by logged-in users.
This function will return up to 32,000 work item IDs.
Syntax | votedWorkItems() |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
watchedWorkItems()
Perform searches based on work items that you are watching. Also, see the Watcher field. Note that this function can only be used by logged-in users.
This function will return up to 32,000 work item IDs.
Syntax | watchedWorkItems() |
---|---|
Supported fields | Work item |
Supported operators |
|
Unsupported operators |
|
Examples |
|
withinCalendarHours()
Only applicable for sites with Jira Service Management subscriptions.
Returns work items that have an SLA that is running according to the SLA calendar.
For example, say your project has two SLAs that count Time to First Response. Some work items with this SLA use a 9am-1pm calendar, and others use a 9am-5pm calendar. If an agent starts work at 3pm, they probably want to work on work items from the 9am-5pm agreement first. They can use withinCalendarHours()
to find all the work items where Time to First Response is running at 3pm.
Syntax | withinCalendarHours() |
---|---|
Supported fields | SLA |
Supported operators |
|
Unsupported operators |
|
Examples |
|
Was this helpful?