SetGet Sorgu Dili (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.
Ne zaman kullanilmali 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
| Component | Description | Example |
|---|---|---|
| Property | The work item property to filter on | state, priority, assignee |
| Operator | How to compare the value | =, !=, IN, NOT IN, <, >, BETWEEN |
| Value | The target value to compare against | "In Progress", "Urgent", "2026-04-01" |
| Logical connector | Combines multiple conditions | AND, 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 property | Description | Value type |
|---|---|---|
state | Workflow state name | String |
state_group | Logical state group | String (backlog, unstarted, started, completed, cancelled) |
priority | Priority level | String (urgent, high, medium, low, none) |
assignee | Assigned member email or display name | String |
label | Label name | String |
cycle | Cycle name | String |
module | Module name | String |
project | Project identifier (workspace views) | String |
created_by | Creator email or display name | String |
subscriber | Subscriber email or display name | String |
mention | Mentioned member email or display name | String |
due_date | Target completion date | Date |
start_date | Planned start date | Date |
created_date | Creation date | Date |
updated_date | Last modification date | Date |
estimate | Effort estimate | Number |
Property names are case-insensitive. State, state, and STATE are all equivalent.
Operators
Comparison operators
| Operator | Meaning | Applicable to |
|---|---|---|
= | Equals | All types |
!= | Not equals | All types |
IN | Matches any value in a list | Strings, numbers |
NOT IN | Does not match any value in a list | Strings, numbers |
< | Less than | Dates, numbers |
> | Greater than | Dates, numbers |
<= | Less than or equal | Dates, numbers |
>= | Greater than or equal | Dates, numbers |
BETWEEN | Within a range (inclusive) | Dates, numbers |
CONTAINS | Property includes the value (for multi-value properties) | Assignees, labels, subscribers |
NOT CONTAINS | Property does not include the value | Assignees, labels, subscribers |
IS EMPTY | Property has no value set | All types |
IS NOT EMPTY | Property has a value set | All types |
Logical operators
| Operator | Meaning |
|---|---|
AND | Both conditions must be true |
OR | At 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:
| Expression | Meaning |
|---|---|
TODAY | Current date |
TODAY - 7d | 7 days ago |
TODAY + 14d | 14 days from now |
START_OF_WEEK | Monday of the current week |
END_OF_WEEK | Sunday of the current week |
START_OF_MONTH | First day of the current month |
END_OF_MONTH | Last day of the current month |
Example:
due_date BETWEEN TODAY AND TODAY + 7dThis returns items due within the next 7 days.
Numbers
Use bare numbers without quotes:
estimate > 5
estimate BETWEEN 1 AND 8Empty checks
Use IS EMPTY and IS NOT EMPTY without a value:
assignee IS EMPTY
due_date IS NOT EMPTYCombining 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 EMPTYThis 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 EMPTYItems 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 + 3dInteractive query editor
The SGL editor is accessible from any view:
- Click the Filter button in the toolbar.
- Click Query Editor (or the code icon) to switch from the graphical builder to the text editor.
- Type your SGL query in the text field.
- Press Enter or click Apply to execute the query.
Autocomplete
The editor provides autocomplete suggestions as you type:
| Trigger | Suggestions offered |
|---|---|
| Start typing a property name | Matching property names |
| After typing an operator | Expected value format hint |
After typing = on a state property | Available state names |
After typing = on a priority property | Priority level names |
After typing = on an assignee property | Workspace member names |
After typing = on a label property | Available label names |
Syntax highlighting
The editor highlights different parts of the query:
| Element | Color |
|---|---|
| Property names | Blue |
| Operators | Purple |
| String values | Green |
| Date values | Orange |
| Logical connectors (AND, OR) | Bold |
| Errors | Red underline |
Error handling
If your query contains a syntax error, the editor shows an error message below the input:
| Error | Cause | Fix |
|---|---|---|
| Unknown property | Typo in the property name | Check the property name table above |
| Invalid operator for property type | Using < on a string property | Use =, !=, IN, or NOT IN for strings |
| Expected value | Missing value after an operator | Add a quoted string, date, or number |
| Unmatched parenthesis | Opening ( without closing ) | Add the missing parenthesis |
| Invalid date format | Date not in YYYY-MM-DD format | Use the format "2026-04-01" |
| Empty query | No conditions specified | Add 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:
- Write and apply your SGL query.
- Click Save as View.
- 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
| Capability | Graphical filter | SGL |
|---|---|---|
| AND across properties | Yes | Yes |
| OR within same property | Yes (multi-select) | Yes |
| OR across different properties | No | Yes |
| Nested conditions | No | Yes |
| Relative dates | Limited presets | Full expression syntax |
| Autocomplete | Built-in | Built-in |
| Shareable as text | No | Yes (copy/paste the query string) |
| Learning curve | Low | Medium |
Ilgili sayfalar
- 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.