Skip to content

SetGet Query Language (SGL) ​

The SetGet Query Language (SGL) is a text-based syntax for expressing filter conditions on work items. While the graphical filter builder covers common scenarios, SGL gives you full control over complex queries including OR logic across different properties, nested conditions, and precise date arithmetic.

When to use SGL ​

Use SGL when:

  • You need OR logic across different properties (the graphical builder only supports AND across properties).
  • You want to type a query faster than clicking through dropdowns.
  • You are building reusable query templates to share with your team.
  • You need to express conditions that the graphical builder does not support.

For simple filters, the graphical filter builder is usually faster and more discoverable.

Syntax overview ​

An SGL query is a sequence of conditions connected by logical operators:

property operator value [AND|OR property operator value ...]

Basic structure ​

ComponentDescriptionExample
PropertyThe work item property to filter onstate, priority, assignee
OperatorHow to compare the value=, !=, IN, NOT IN, <, >, BETWEEN
ValueThe target value to compare against"In Progress", "Urgent", "2026-04-01"
Logical connectorCombines multiple conditionsAND, OR

Example ​

state = "In Progress" AND priority = "Urgent" AND assignee = "alice@example.com"

This query returns work items that are In Progress, Urgent priority, and assigned to Alice.

Property names ​

Use the following property names in SGL queries:

SGL propertyDescriptionValue type
stateWorkflow state nameString
state_groupLogical state groupString (backlog, unstarted, started, completed, cancelled)
priorityPriority levelString (urgent, high, medium, low, none)
assigneeAssigned member email or display nameString
labelLabel nameString
cycleCycle nameString
moduleModule nameString
projectProject identifier (workspace views)String
created_byCreator email or display nameString
subscriberSubscriber email or display nameString
mentionMentioned member email or display nameString
due_dateTarget completion dateDate
start_datePlanned start dateDate
created_dateCreation dateDate
updated_dateLast modification dateDate
estimateEffort estimateNumber

Property names are case-insensitive. State, state, and STATE are all equivalent.

Operators ​

Comparison operators ​

OperatorMeaningApplicable to
=EqualsAll types
!=Not equalsAll types
INMatches any value in a listStrings, numbers
NOT INDoes not match any value in a listStrings, numbers
<Less thanDates, numbers
>Greater thanDates, numbers
<=Less than or equalDates, numbers
>=Greater than or equalDates, numbers
BETWEENWithin a range (inclusive)Dates, numbers
CONTAINSProperty includes the value (for multi-value properties)Assignees, labels, subscribers
NOT CONTAINSProperty does not include the valueAssignees, labels, subscribers
IS EMPTYProperty has no value setAll types
IS NOT EMPTYProperty has a value setAll types

Logical operators ​

OperatorMeaning
ANDBoth conditions must be true
ORAt least one condition must be true

Use parentheses to control precedence when mixing AND and OR:

(state = "In Progress" OR state = "In Review") AND priority = "Urgent"

Without parentheses, AND takes precedence over OR.

Value formats ​

Strings ​

Enclose string values in double quotes:

state = "In Progress"
label = "Bug"
assignee = "alice@example.com"

Multiple values (IN operator) ​

Use parentheses with comma-separated quoted values:

state IN ("Todo", "In Progress", "In Review")
priority NOT IN ("None", "Low")

Dates ​

Use ISO 8601 format (YYYY-MM-DD) in double quotes:

due_date < "2026-04-01"
created_date BETWEEN "2026-03-01" AND "2026-03-31"

Relative dates ​

SGL supports relative date expressions for dynamic queries:

ExpressionMeaning
TODAYCurrent date
TODAY - 7d7 days ago
TODAY + 14d14 days from now
START_OF_WEEKMonday of the current week
END_OF_WEEKSunday of the current week
START_OF_MONTHFirst day of the current month
END_OF_MONTHLast day of the current month

Example:

due_date BETWEEN TODAY AND TODAY + 7d

This returns items due within the next 7 days.

Numbers ​

Use bare numbers without quotes:

estimate > 5
estimate BETWEEN 1 AND 8

Empty checks ​

Use IS EMPTY and IS NOT EMPTY without a value:

assignee IS EMPTY
due_date IS NOT EMPTY

Combining conditions ​

AND logic ​

All conditions connected with AND must be true:

state = "In Progress" AND priority = "Urgent" AND assignee = "bob@example.com"

OR logic ​

At least one condition connected with OR must be true:

priority = "Urgent" OR priority = "High"

Mixed logic with parentheses ​

Parentheses group conditions and control evaluation order:

(priority = "Urgent" OR priority = "High") AND state != "Done" AND assignee IS NOT EMPTY

This returns items that are Urgent or High priority, not Done, and have at least one assignee.

Nested parentheses ​

You can nest parentheses for complex expressions:

(state = "In Progress" AND priority = "Urgent") OR (state = "Todo" AND due_date < TODAY)

This returns items that are either Urgent and In Progress, or overdue items still in Todo.

Examples for common queries ​

My overdue items ​

assignee = "me" AND due_date < TODAY AND state_group != "completed" AND state_group != "cancelled"

The special value "me" refers to the current logged-in user.

Unassigned backlog items in a specific project ​

project = "BACKEND" AND assignee IS EMPTY AND state = "Backlog"

Items created this month but not yet started ​

created_date >= START_OF_MONTH AND state_group = "unstarted"

High-priority items without an estimate ​

priority IN ("Urgent", "High") AND estimate IS EMPTY

Items in a specific cycle with a particular label ​

cycle = "Sprint 14" AND label CONTAINS "Frontend"

Items updated recently but not assigned to the current sprint ​

updated_date >= TODAY - 7d AND cycle != "Sprint 14"

Items blocking other work ​

label CONTAINS "Blocker" AND state_group IN ("unstarted", "started")

Workspace-wide triage query ​

priority = "Urgent" AND state_group != "completed" AND state_group != "cancelled" AND due_date <= TODAY + 3d

Interactive query editor ​

The SGL editor is accessible from any view:

  1. Click the Filter button in the toolbar.
  2. Click Query Editor (or the code icon) to switch from the graphical builder to the text editor.
  3. Type your SGL query in the text field.
  4. Press Enter or click Apply to execute the query.

Autocomplete ​

The editor provides autocomplete suggestions as you type:

TriggerSuggestions offered
Start typing a property nameMatching property names
After typing an operatorExpected value format hint
After typing = on a state propertyAvailable state names
After typing = on a priority propertyPriority level names
After typing = on an assignee propertyWorkspace member names
After typing = on a label propertyAvailable label names

Syntax highlighting ​

The editor highlights different parts of the query:

ElementColor
Property namesBlue
OperatorsPurple
String valuesGreen
Date valuesOrange
Logical connectors (AND, OR)Bold
ErrorsRed underline

Error handling ​

If your query contains a syntax error, the editor shows an error message below the input:

ErrorCauseFix
Unknown propertyTypo in the property nameCheck the property name table above
Invalid operator for property typeUsing < on a string propertyUse =, !=, IN, or NOT IN for strings
Expected valueMissing value after an operatorAdd a quoted string, date, or number
Unmatched parenthesisOpening ( without closing )Add the missing parenthesis
Invalid date formatDate not in YYYY-MM-DD formatUse the format "2026-04-01"
Empty queryNo conditions specifiedAdd at least one condition

The query is not applied until all errors are resolved. The previous filter state remains active while you fix errors.

TIP

If you are unsure about the syntax, start with the graphical filter builder and then switch to the query editor to see the SGL equivalent. This is an effective way to learn the syntax.

Save SGL queries as views ​

SGL queries can be saved as views just like graphical filters:

  1. Write and apply your SGL query.
  2. Click Save as View.
  3. Enter a name and click Save.

The view stores the raw SGL query. When you open the view, the query editor shows the saved query text. You can also switch to the graphical builder to see the conditions visually (when the query is compatible with the builder's capabilities).

SGL vs. graphical filters ​

CapabilityGraphical filterSGL
AND across propertiesYesYes
OR within same propertyYes (multi-select)Yes
OR across different propertiesNoYes
Nested conditionsNoYes
Relative datesLimited presetsFull expression syntax
AutocompleteBuilt-inBuilt-in
Shareable as textNoYes (copy/paste the query string)
Learning curveLowMedium
  • Filters — Graphical filter builder for common filter scenarios.
  • Views Overview — Save SGL queries as reusable views.
  • Display Options — Configure grouping and ordering alongside filters.
  • Your Work — Personal dashboard with pre-filtered sections.
  • Work Items Overview — Understand the properties available for querying.