Advanced Search

Advanced case search allows you to search for a case using custom queries that match specified criteria. You can create fine-grained searches that extend beyond what is possible with basic search filters. For example, you can search for cases of a certain type that were added by a specific user between specified dates.

Some of the search criteria to keep in mind:

  • 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.

How to Perform Advanced Search

  1. Go to Case Management > Cases on the left navigation.
  2. Select Advanced instead of Basic as the search option at the top of the page.
    • The advanced search field is now available for you to enter custom queries.
1600

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 has the following format:

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 the sort order isn’t specified, the default sort order is based on the relevance 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

Following fields are supported for advanced case search.

FieldDescription
textAll the text in case title, case description, case comments, task title, task description, and task comments.
statusCurrent state of the case: Closed, Open, in Progress, or Todo (for tasks), and so on.
priorityImportance of the case: Critical, Blocker, Medium, Low, Informational, and so on.
assigneeUser the case is assigned to. Must be a complete username.
reporterUser who opened the case. Must be a complete username.
titleCase title.
descriptionCase description.
createdDate 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.
issuetypeType of reported issue: case or task.
casetypeType of a case. For example, default or any customized name given while creating a case type.
modifiedatModified 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'
currentuser()Filters Current user (Reporter, and/or Assignee, and/or the name created through User Type field) of the case.

Supported Operators

Following operators are supported for advanced search queries.

OperatorDescription
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 ascOrders the results with the value of the specified field in ascending order.
order by descOrders the results with the value of the specified field in descending order.
andApplies the boolean and operation.
orApplies the boolean or operation.

Supported ISO Format Timezone

Advanced search supports timezone search in the advanced case search. The following example shows the search query for the timezone, issuetype = 'case' being the default.

Example: issuetype = 'case' and created >= '2021-04-09T00:00:00Z' and created <='2021-04-10T00:00:00Z' where, Z can be replaced according to the timezone.

1600

Another example of the timezone search query is issuetype = 'case' and created >= '2021-04-09T00:00:00+05:30' and created <='2021-04-10T00:00:00+05:30'. Here, Z is replaced with GMT timezone (+05:30).

Search Cases by Created or Modified Date

The advanced search allows you to search for cases based on the created and modified date.

Example: issueType = 'case' and created > '2021-08-01' and modifiedat <='2021-08-31'

1600

Search Exact Phrases using Backtick Syntax

The advanced search allows you to search for an exact phrase or term using a phrase query along with backtick syntax to get the exact match results.

Example - Search query without using backtick: title ~ "I get too many emails". This is a normal query search that returns all the cases that contain these words.

1600

In this example - Search query using backtick, title ~ "I get too many emails" searching a phrase query within a backtick will return results with the exact match of the query provided.

1600

Search Cases by Status Type

You can search for cases by status type using a simple query in the Advanced Search field.

Example:
statusType = "Closed", statusType != "In progress", or statusType = "Open".
Use "=" or "!=" in your search queries.

The status type that is linked to the status will be displayed as search results. To know more about creating status and status type, see Status Workflow.

1600

The available status types are Open, In progress, and Closed. To know more about creating statuses, see How to Create a Status Workflow.

Search Cases with Empty Value Set in the Custom Field

You can search for cases that contain empty values in one of the fields.

Example:
domain = "". This means that the query must search for all the null values in the domain field. The search shows 699 cases that have an empty value in the domain field.

1600

You can search using the field name or the display name in the query.

Example:
If date is the field name and DateTime is the display name of a field, then you can search for DateTime = "" that will display results including all the date-related fields.

1600

Additional Examples

DescriptionExample
You cannot directly search for tasks, but you can search for the text in the task title, description, and comments. You can also find tasks by searching on the statuses Todo, In Progress, or DoneStatus = "done" OR status = "todo" or status = "in progress"
Search 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”
Search 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”
Search 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"
Search all cases and tasks that are assigned to ava and that were not reported by layla.assignee = ”ava” AND reporter != ”layla”
Search all cases with text that contains the words phishing and threat and with the status that is Open or In Progress.title ~ “keywords to find” AND (status = ”Open” OR status = ”In Progress”)
Search all cases assigned to currentuser() and that have status not in closed state.assignee=currentUser() and status!=closed

What's Next

🔗   Case Settings


© Devo Technology Inc. All Rights Reserved.