YouTrack Standalone 2017.1 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

QueryDescription
"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 #unresolvedReturns unresolved issues that are assigned to the current user.
for: me unresolvedReturns issues that are assigned to the current user and contain word forms that match 'unresolved' in the summary, description, or comments.
for: mazineReturns issues that are assigned to the user with the user name 'mazine'.
mazineReturns issues that contain word forms that match 'mazine'.
#mazineReturns issues that were created by or are assigned to the users with the username 'mazine'.
-mazineReturns issues that were created by or are assigned to any user except for the user with the username 'mazine'.
state: -open, -submittedReturns all issues except for those that have the state 'open' or 'submitted'.
sort by: priority, issue id ascReturns a list of all issues sorted first by priority, then by issue ID in ascending order.
tag: A, BReturns 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: BReturns 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: BReturns 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: BReturns 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: BReturns a list of issues that have both tag 'A' and tag 'B'. The query is resolved as an 'A and B' expression.

Last modified: 18 April 2017