Query language

If the basic filters don't give you enough options, use the query language to define a filter.

The query language allows you to:

Query format

To define a filter using the query language:

  1. Choose Filters → + New filter on the upper panel in Tracker.

  2. Go to the Query tab.

  3. Enter a query and click Apply.

The basic format of the query is:

"parameter": "value"

To set the parameter, start typing its name and choose the appropriate one from the suggestions. For the full list of parameters, see the section Filter parameters.

Examples

Issues that are in the TEST queue:

  • "Queue": "TEST"
  • Issues that are assigned to Alice Little:

    "Assignee": "Alice Little"
  • Issues with the status Open or In progress.

    "Status": "Open", "In progress"
  • Issues created from January 1 to January 30, 2017:

    "Created": "2017-01-01".."2017-01-30"

Multiple parameter values

If you want to filter issues by multiple values for the same parameter, separate them with commas:
parameter: "value1", "value2", " value3"
Example
author: "vpupkin","iivanov"

This filter outputs all issues that were reported by vpupkin or iivanov.

Filters with multiple conditions

You can combine multiple conditions in a single filter using Boolean operators:

  • AND — The logical AND operator. Conditions combined with this operator must all be met at the same time.

    Example:
    parameter1: "value1" AND parameter2: "value2"

    This query outputs the issues that have parameter1 set to value1 and parameter2 set to value2.

    Note. Instead of using the AND operator, you can just list the fields separated by a space.
  • OR — The logical OR operator. At least one of the conditions combined with this operator must be met.

    Example:
    parameter1: "value1" OR parameter2: "value2"

    This query outputs the issues that meet at least one of these conditions: parameter1 is set to value1 or parameter2 is set to value2.

You can create complex filters by combining multiple operators in a single query:

parameter1: "value1" AND parameter2: "value2" OR parameter3: "value3"

When complex filters are processed, the AND operators are applied first. Use parentheses to change the order of actions:

parameter1: "value1" AND (parameter2: "value2" OR parameter3: "value3")

Text search

In addition to searching by parameters, you can also use the familiar text search. To do this, enter text in the Query field and click Apply.

The search is performed across all the text fields in the issue: name, description, and comments. To search in only one of the fields, use the parameter to specify it:

  • Summary — The issue name.

  • Description — The issue description.

  • Comment — Text in comments.

  • History — Text in the history of changes.

To find only issues with text that exactly matches the query text, use the # operator:
Summary: #"Lorem ipsum dolor sit amet"
Example
Description: "Off with her head"

This filter outputs all the issues that have a description containing the words and close forms of the words in the query.

Date and time parameters

Many issue parameters have date and time values. The query language supports several formats for these parameters:

Date
  • MM/DD/YYYY

    Example:

    04/30/2017
  • DD.MM.YYYY

    Example:

    30.04.2017
  • DD-MM-YYYY

    Example:

    30-04-2017
  • YYYY-MM-DD

    Example:

    2017-04-30
Time

You can set time intervals in weeks, days, hours, minutes and seconds in the format:

"XXw XXd XXh XXm XXs"

For example, a time interval of 3 days 5 hours and 32 minutes is written as:

"3d 5h 32m"

When searching fields that contain a date, you can use the addition and subtraction operations, time ranges, and functions.

Here is an example of a filter for issues created no earlier than eight days ago:

Created: > today() - "1w 1d"

A filter for issues that were created in a certain period of time:

Created: 01-01-2017 .. 02-03-2017

Comparison operations

In addition to looking for exact matches, the query language supports comparisons:

  • Not equal to

    parameter: !"value"
  • Greater than, Less than, Less than or equal to, Greater than or equal to

    These operations are only applied to numeric parameters and date and time parameters.

    parameter: >numberparameter: <numberparameter: >= numberparameter: <= number
  • In the range

    This operation is only applied to numeric parameters.

    parameter: number1 .. number2

Functions

In addition to explicit parameter values, you can use functions. A function is a variable with a value that is calculated when the request is executed. For example, the function today() takes the value of today's date. To show all issues created today, use the query:

Created: today()
FunctionResultExample
empty() 

Empty value (parameter omitted)

Find issues that don't have an assignee:

Assignee: empty()
notEmpty()

Any non-empty value (parameter set)

Find issues that have a deadline set:

Deadline: notEmpty()
me() 

Name of the user who made the request

Find issues that you created:

Author: me()
now()

Current time to the minute

Find issues created in the last 12 hours:

Created: >now()-12h
today()
Time interval corresponding to the current date

Find issues created today:

Created: today()
week()

Date range corresponding to the current week

Find issues created this week:

Created: week()
month() 

Date range corresponding to the current month

Find issues created in this month:

Created: month()
quarter() 

Date range corresponding to the current quarter

Find issues created in this quarter:

Created: quarter()
year()

Date range for the current year

Find issues created this year:

Created: year()
unresolved()

No resolution

Find all issues that do not have a resolution set:

Resolution: unresolved()
group()

List of department employees

Find issues that employees of the Sales department are working on:

Assignee: group(value: "Commercial Department") 

Search for parameter changes

If you know when and how a parameter was changed for an issue, you can create a filter for it:
"parameter": changed(from: "old value" to: "new value" by: "who changed" date: "when changed"

For example, to get a list of issues that user Alice Little switched to the status "In progress" in a certain time period, make the query:

Status: changed(to: "In progress" by: "Alice Little" date: 01.09.2017 .. 15.09.2017)

Sort results

You can sort the filter results by setting the "Sort By" parameter at the end of the query. For the value, specify the name of the field to sort by:
"Sort By": Created

If necessary, set the sort order to ascending (ASC) or descending (DESC):

"Sort By": Created ASC

To specify multiple fields to sort by, separate them with commas in order of priority:

"Sort By": Created ASC, Updated DESC

Useful queries

Try a few ready-made queries to learn how they work:

  • Active issues that you created:

    Author: me() Resolution: empty()
  • Active issues that you are assigned to:

    Assignee: me() Resolution: empty()
  • Active issues that you are following:

    Followers: me() Resolution: empty()
  • Issues that you are assigned to that have a deadline during the current week:

    Assignee: me() Deadline: week()
  • Issues with Critical or Blocker priority for which you are the reporter, assigned, or follower.

    (Followers: me() OR Assignee: me() OR Author: me()) AND Resolution: empty() AND Priority: Blocker, Critical

Filter parameters

ParameterDescriptionExample
"Access"

Logins or names of users listed in the Access field

Find issues that have user3370 or Alice Little in the Access field:

Access: "user3370", "Alice Little"
"Affected Version"

Values for the Affected version parameter

"Affected Version": "14.09.1978"
"Assignee"

Logins or names of assignees

Find tasks that are assigned to user3370 or Alice Little:

Assignee: "user3370", "Alice Little"
"Author"

Logins or names of reporters

Find issues reported by user3370 or Alice Little:

Author: "user3370", "Alice Little"
"Comment"

Comment text

  • Find issues with comments that contain the words and forms of words in a phrase:

    "Comment": "great job"
  • Find issues with comments that contain the exact phrase:

    "Comment": #"great job"
"Comment Author"

Logins or names of users who left comments on issues

Find issues commented on by user3370 or Alice Little:

"Comment Author": "user3370", "Alice Little"
"Component Lead"

Logins or names of users who are responsible for components

Find issues related to components that are owned by user3370 or Alice Little:

"Component Lead": "user3370", "Alice Little"
"Components"

Names of the components the issues are related to

Find issues that are related to the components “backend” or “frontend”:

Components: "backend", "frontend"
"Created"
Date or date range of issue creation

Find issues created from January 1 to January 30, 2017:

Created: 2017-01-01..2017-01-30
"Deadline"

Date or date range of issue deadline

Find issues with a deadline on January 30, 2017:

Deadline: 2017-01-30
"Description "

Issue description

  • Find issues that have a description containing the words and and word forms in the phrase:

    "Description": "invent the wheel"
  • Find issues that contain the exact phrase in the description:

    "Description": #"invent the wheel"
"Duplicates"

Keys of issues that are duplicates of the issues to search for

Find issues that duplicate TASK-123 and TASK-321:

Duplicates: "TASK-123", "TASK-321"
"End Date"

Date or range of dates for the issue end date

Find issues with the end date January 30, 2017:

"End Date": 2017-01-30
"Epic"

Keys of epics that issues are related to

Find issues related to epics TASK-123 and TASK-321:

Epic: "TASK-123", "TASK-321"
"Favorited by"

Your favorite issues. Only the me() function can be used as the parameter value.

Find my favorite issues:

"Favorited by": me()
"Filter"

ID or name of the filters that issues match

Find issues that meet the filter “Issues in my department”:

Filter: "Issues in my department"
"Fix Version"

Values of the Fix in versions parameter

"Fix Version": "12.11.1986"
"Followers"

Logins or names of followers

Find issues that user3370 or Alice Little are subscribed to:

Followers: "user3370", "Alice Little"
"History"

Text in the history of changes

  • Find issues with a history that has the words or forms of words in the phrase:

    "Description": "easy peasy"
  • Find issues with a history that contains the exact phrase:

    "Description": "easy peasy"
"Is Parent Task For"

Keys of issues to find parent issues of

Find the parent issues of TASK-123 and TASK-321:

"Is Parent Task For": "TASK-123", "TASK-321"
"Is Subtask For"

Keys of issues to find sub-issues of

Find the sub-issues of TASK-123 and TASK-321:

"Is Subtask For": "TASK-123", "TASK-321"
"Key"

Issue keys

Find issues with the keys TASK-123 and TASK-321:

KEY: "TASK-123", "TASK-321"
"Linked to"

Keys of issues to find any type of related issues for (parent, child, related, duplicate, original)

Find issues related to the issues TASK-123 and TASK-321:

"Linked to": "TASK-123", "TASK-321"
"Maillists"

Departments and teams subscribed to issues

Find issues that the “Help Desk” department is subscribed to.

Maillists: "Helpdesk"
"Modifier"

Logins or names of users who made the last changes to issues

Find issues with the most recent changes made by user3370 or Alice Little:

Modifier: "user3370", "Alice Little"
"Old Queue"

Name or key of the previous queue (for issues that were moved to another queue)

Find issues that were moved from the TEST queue:

"Old Queue": "TEST"
"Original"

Keys of original issues for cloned issues to find

Find clones of the issues TASK-123 and TASK-321:

Original: "TASK-123", "TASK-321"
"Original Estimate"

Initial estimation of time needed to complete issues

Find issues with an initial estimation of 5 days 2 hours and 30 minutes:

"Original Estimate": "5d2h30m"
"Priority"

Issue priorities

Find issues with Minor or Normal priority:

Priority: "Minor", "Normal"
"Queue"

Name or key of the queue that issues belong to

Find issues that are in the TEST queue:

Queue: "TEST"
"Queue Lead"

Logins or names of queue owners that issues are related to

Find issues in queues owned by user3370 or Alice Little:

"Queue Lead": "user3370", "Alice Little"
"Related"

Logins or names of users who are reporters, assignees, or followers of issues

Find issues that have user3370 or Alice Little as the reporter, assignee, or follower:

Related: "user3370", "Alice Little"
"Relates"

Keys of issues to find linked issues for

Find issues related to the issues TASK-123 and TASK-321:

Relates: "TASK-123", "TASK-321"
"Resolved"

Date or date range of resolution

Find issues completed between January 1 and January 30, 2017:

Resolved: 2017-01-01..2017-01-30
"Resolver"

Logins or names of users who set the resolution

Find issues that were resolved by user3370 or Alice Little:

Resolver: "user3370", "Alice Little"
"Sprint"

ID or name of the sprint that issues belong to

Find issues related to the spring “TrackerSprint32”:

Sprint: "TrackerSprint32"
"Sprints By Board"

ID of the Agile board with the sprint that issues are in

Find issues related to Agile board 87:

"Sprints By Board": 87
"Start Date"

Date or range of dates for the issue start date

Find issues with a start date before January 30, 2017:

"Start Date": <2017-01-30
"Status"

Issue statuses

Find issues with the status Open, Resolved, or Closed:

Status: Open, Resolved, Closed
"Story Points"

Estimated effort for issues in Story Points

Find issues with 5 or more Story Points:

"Story Points": >=5
"Summary"

Issue name

  • Find issues that have a title containing the words and and word forms in the phrase:

    "Summary": "invent the wheel"
  • Find issues that contain the exact phrase in the title:

    "Summary": #"invent the wheel"
"Tags"

Issue tags

Find issues labeled with the tags Support or wiki:

Tags: "Support", "wiki"
"Time Spent"

Time spent on issues

Find issues with more than 5 days 2 hours and 30 minutes spent:

"Time Spent": >"5d2h30m"
"Updated"

Date or range of dates when the issue was changed

Find issues that were changed after January 30, 2017:

Updated: >2017-01-30
"Voted by"

Logins or names of users who upvoted the issue

Find issues that user3370 or Alice Little upvoted:

"Voted By": "user3370", "Alice Little"
"Votes"

Number of votes for the issue

Find issues with more than 6 upvotes:

Votes: > 6