Advanced Case Search

Advanced case search allows you to create custom queries to find cases that match specified criteria. You can create fine-grained searches that extend beyond what is possible with basic search filters.

  • All searches are case-insensitive.
  • Spaces between elements of a search query are ignored.
  • Searching is supported on fields and case parameters.
  • You cannot directly search on comments, but a text search finds text in the case and task comments.
  • You can search for standard and custom fields.

To access advanced case search:

  1. Select Case Management > Cases on the side menu.
  2. Select Advanced instead of Basic as the search options at the top of the page.
    The advanced search field is now available for you to enter custom queries.

The advanced search field provides instant feedback about the validity of the query you enter. If the query is valid, a green checkmark is shown, as in the previous figure. If the search syntax isn't valid, a red alert icon is shown.

Query Structure

A simple advanced query is of the following form:

field (operator) “value”

Example:
status = “closed”

You can create more complex queries by using the boolean operators and and or with parentheses added as needed.

Example:
assignee != "auto" AND (status = "done" OR status = "todo")

To specify the ordering of the results, include the order by operator at the end of your query with the field and sort order (ascending or descending) specified. If sort order isn’t specified, the default sort order is based on the relevancy of the match.

Example:
The following example sorts the search results in descending order based on the created date:
assignee=”peter” AND reporter=”john” order by created desc

Supported Fields

The following fields are supported for advanced case search.

Field

Description

text

All the text in case title, case description, case comments, task title, task description, and task comments.

status

Current state of the case: Closed, Open, in Progress, or Todo (for tasks), and so on.

priority

Importance of the case: Critical, Blocker, Medium, Low, Informational, and so on.

assignee

User the case is assigned to. Must be a complete username.

reporter

User who opened the case. Must be a complete username.

title

Case title.

description

Case description.

created

Date and time the case was created.
The supported date formats are:
'yyyy/MM/dd HH:mm'
'yyyy-MM-dd HH:mm'
'yyyy/MM/dd'
'yyyy-MM-dd'

These date and time strings are interpreted as in the UTC timezone.

issuetype

Type of reported issue: case or task.

casetype

Type of a case. For example, default or any customized name given while creating a case type.

modifiedat

Modified date of a case.
The supported date formats are:
'yyyy/MM/dd HH:mm'
'yyyy-MM-dd HH:mm'
'yyyy/MM/dd'
'yyyy-MM-dd'

Supported Operators

Operator

Description

Contains, ~

Matches if the field contains the indicated text string.

Can be used with case title, case summary, case comments, task title, task summary, or task comments.

Performing this type of search on a phrase is equivalent to an and search on the individual words in the phrase. For example, the search

text ~ “cannot send output”

finds the case with the title “Cannot send step to output”.

=

Matches the current state of the case: closed, open, or inprogress.

!=

Matches if the current state of the case is not the specified value.

, <, >=, <=

Matches if the indicated comparison is valid. Applies only to the created field (date field).

order by asc

Orders the results with the value of the specified field in ascending order.

order by desc

Orders the results with the value of the specified field in descending order.

and

Applies the boolean and operation.

or

Applies the boolean or operation.

Additional Examples

Example1:
You cannot directly search on tasks, but you can search on the text in the task title, task description, and task comments. You can also find tasks by searching on the statuses Todo, In Progress, or Done as in this example:
Status = "done" OR status = "todo" or status = "in progress"

Example 2:
The following equivalent searches find all cases and tasks that contain the word threat in the case title, case summary, case comments, task title, task summary, or task comments.
text ~ “Threat”
Text contains “threat”
Text contains “THREAT”

Example 3:
The following search finds all cases and tasks with text that contains the words step, service, and interruption and that have the status In Progress.
text contains “step service interruption” AND status = ”In Progress”

Example 4:
The following search finds all cases assigned to ava that were created between June 1, 2019 and July 30, 2019.
assignee = "ava" AND created >= "2019-06-01" and created <= "2019-07-30"

Example 5:
The following search finds all cases and tasks that are assigned to ava and that were not reported by layla.
assignee = ”ava” AND reporter != ”layla”

Example 6:
The following search finds all cases with text that contains the words phishing and threat and with status that is Open or In Progress.
title ~ “keywords to find” AND (status = ”Open” OR status = ”In Progress”)


Did this page help you?