YouTrack Standalone 2017.4 Help

Search Query Grammar

This page provides a BNF description of the YouTrack search query grammar.

Grammar

<SearchRequest> ::= <OrExpression> <OrExpession> ::= <AndExpression> ('or' <AndExpression>)* <AndExpression> ::= <AndOperand> ('and' <AndOperand>)* <AndOperand> ::= '('<OrExpression>? ')' | Term <Term> ::= <TermItem>* <TermItem> ::= <QuotedText> | <NegativeText> | <PositiveSingleValue> | <NegativeSingleValue> | <Sort> | <Has> | <CategorizedFilter> | <Text> <CategorizedFilter> ::= <Attribute> ':' <AttributeFilter> (',' <AttributeFilter>)* <Attribute> ::= <name of issue field> <AttributeFilter> ::= ('-'? <Value> ) | ('-'? <ValueRange>) <ValueRange> ::= <Value> '..' <Value> <PositiveSingleValue> ::= '#'<SingleValue> <NegativeSingleValue> ::= '-'<SingleValue> <SingleValue> ::= <Value> <Sort> ::= 'sort by:' <SortField> (',' <SortField>)* <SortField> ::= <SortAttribute> ('asc' | 'desc')? <Has> ::= 'has:' <Attribute> (',' <Attribute>)* <QuotedText> ::= '"' <text without quotes> '"' <NegativeText> ::= '-' <QuotedText> <Text> ::= <text without parentheses> <Value> ::= <ComplexValue> | <SimpleValue> <SimpleValue> ::= <value without spaces> <ComplexValue> ::= '{' <value (can have spaces)> '}'

Grammar is case-insensitive.

For a complete list of search attributes, see Search Query Reference.

Examples

Query

Description

"export configuration"

Returns issues that contain word forms that match 'export' and 'configuration' in the specified order in the summary, description, or comments.

for: me #unresolved

Returns unresolved issues that are assigned to the current user.

for: me unresolved

Returns issues that are assigned to the current user and contain word forms that match 'unresolved' in the summary, description, or comments.

for: mazine

Returns issues that are assigned to the user with the user name 'mazine'.

mazine

Returns issues that contain word forms that match 'mazine'.

#mazine

Returns issues that were created by or are assigned to the users with the username 'mazine'.

-mazine

Returns issues that were created by or are assigned to any user except for the user with the username 'mazine'.

state: -open, -submitted

Returns all issues except for those that have the state 'open' or 'submitted'.

sort by: priority, issue id asc

Returns a list of all issues sorted first by priority, then by issue ID in ascending order.

tag: A, B

Returns a list of issues that have either tag 'A' or tag 'B'. The query is resolved as an 'A or B' expression.

tag: A tag: B

Returns a list of issues that have either tag 'A' or tag 'B'. The query is resolved as an 'A or B' expression. Two values in the same category are treated as disjunctive.

tag: A state: B

Returns a list of issues that have the tag 'A' and the state 'B'. The query is resolved as an 'A and B' expression. Values in different categories are treated as conjunctive.

tag: A or tag: B

Returns a list of issues that have either tag 'A' or tag 'B'. The query is resolved as an 'A or B' expression.

tag: A and tag: B

Returns a list of issues that have both tag 'A' and tag 'B'. The query is resolved as an 'A and B' expression.

Last modified: 7 March 2019