JIRA 4.0 : Advanced Searching
This page last changed on Oct 01, 2009 by rosie@atlassian.com.
On this page: What is an Advanced Search?An advanced search allows you to use structured queries to search for JIRA issues. Your query will consist of a field, followed by an operator, followed by a value or function. For example, the following query will find all issues in the "TEST" project: project = "TEST" (This example uses the Project field, the EQUALS operator, and the value "TEST".) Note that it is not possible to compare two fields. When you perform an advanced search, you are using the JIRA Query Language (JQL). JQL gives you some SQL-like statements, such as > and NULL. It is not, however, a database query language; for example, JQL does not have a SELECT statement. How to Perform an Advanced Search
Keywords ReferenceANDUsed to combine multiple statements, allowing you to refine your search. Note that you can use parentheses to control the order in which statements are executed. Examples
ORUsed to combine multiple statements, allowing you to expand your search. Note that you can use parentheses to control the order in which statements are executed. (Note: also see IN, which can be a more convenient way to search for multiple values of a field.) Examples
NOTUsed to negate individual operators or entire statements of a query, allowing you to refine your search. Note that you can use parentheses to control the order in which statements are executed. (Note: also see NOT_EQUALS ("!="), DOES_NOT_CONTAIN ("!~"), NOT_IN and IS_NOT.) Examples
EMPTYUsed to search for issues where a given field does not have a value. See also NULL. Note that EMPTY can only be used with fields that support the IS and IS_NOT operators. To see a field's supported operators, check the individual field reference. Examples
NULLUsed to search for issues where a given field does not have a value. See also EMPTY. Note that NULL can only be used with fields that support the IS and IS_NOT operators. To see a field's supported operators, check the individual field reference. Examples
ORDER BYUsed to specify the fields by whose values the search results will be sorted. By default, the field's own sorting order will be used. You can override this by specifying ascending order ("asc") or descending order ("desc"). Examples
Operators ReferenceEQUALS: =The "=" operator is used to search for issues where the value of the specified field exactly matches the specified value. (Note: cannot be used with text fields; see the CONTAINS operator instead.) Examples
NOT EQUALS: !=The "!=" operator is used to search for issues where the value of the specified field does not match the specified value. (Note: cannot be used with text fields; see the DOES_NOT_MATCH ("!~") operator instead.) Note that typing field != value is the same as typing NOT field = value, and that field != EMPTY is the same as field IS_NOT EMPTY. Examples
GREATER THAN: >The ">" operator is used to search for issues where the value of the specified field is greater than the specified value. Cannot be used with text fields. Note that the ">" operator can only be used with fields which support ordering (e.g. date fields and version fields). To see a field's supported operators, check the individual field reference. Examples
GREATER THAN EQUALS: >=The ">=" operator is used to search for issues where the value of the specified field is greater than or equal to the specified value. Cannot be used with text fields. Note that the ">=" operator can only be used with fields which support ordering (e.g. date fields and version fields). To see a field's supported operators, check the individual field reference. Examples
LESS THAN: <The "<" operator is used to search for issues where the value of the specified field is less than the specified value. Cannot be used with text fields. Note that the "<" operator can only be used with fields which support ordering (e.g. date fields and version fields). To see a field's supported operators, check the individual field reference. Examples
LESS THAN EQUALS: <=The "<=" operator is used to search for issues where the value of the specified field is less than or equal to than the specified value. Cannot be used with text fields. Note that the "<=" operator can only be used with fields which support ordering (e.g. date fields and version fields). To see a field's supported operators, check the individual field reference. Examples
INThe "IN" operator is used to search for issues where the value of the specified field is one of multiple specified values. Using "IN" is equivalent to using multiple EQUALS (=) statements, but is shorter and more convenient. That is, typing reporter IN (tom, jane, harry) is the same as typing reporter = "tom" OR reporter = "jane" OR reporter = "harry". Examples
NOT INThe "NOT IN" operator is used to search for issues where the value of the specified field is not one of multiple specified values. Using "NOT IN" is equivalent to using multiple NOT_EQUALS (!=) statements, but is shorter and more convenient. That is, typing reporter NOT IN (tom, jane, harry) is the same as typing reporter != "tom" AND reporter != "jane" AND reporter != "harry". Examples
CONTAINS: ~The "~" operator is used to search for issues where the value of the specified field contains a "fuzzy" match for the specified value. For use with text fields only, i.e.:
Note: when using the "~" operator, the value on the right-hand side of the operator can be specified using JIRA text-search syntax. Examples
DOES NOT CONTAIN: !~The "!~" operator is used to search for issues where the value of the specified field is not a "fuzzy" match for the specified value. For use with text fields only, i.e.:
Note: when using the "!~" operator, the value on the right-hand side of the operator can be specified using JIRA text-search syntax. Examples
ISThe "IS" operator can only be used with EMPTY or NULL. That is, it is used to search for issues where the specified field has no value. Note that not all fields are compatible with this operator; see the individual field reference for details. Examples
IS NOTThe "IS NOT" operator can only be used with EMPTY or NULL. That is, it is used to search for issues where the specified field has a value. Note that not all fields are compatible with this operator; see the individual field reference for details. Examples
Fields ReferenceAffected VersionSearch for issues that are assigned to a particular Affects Version(s). You can search by version name or version ID (i.e. the number that JIRA automatically allocates to a version).
Note: this field supports auto-complete. SyntaxaffectedVersion Field TypeVERSION Supported Operators
Supported FunctionsWhen used with the IN and NOT_IN operators, affectedVersion supports: Examples
AssigneeSearch for issues that are assigned to a particular user. You can search by the user's Full Name, ID or Email Address. Note: this field supports auto-complete. Syntaxassignee Field TypeUSER Supported Operators
Supported FunctionsWhen used with the IN and NOT_IN operators, assignee supports: When used with the EQUALS and NOT_EQUALS operators, assignee supports: Examples
CategorySearch for issues that belong to projects in a particular Category. Note: this field supports auto-complete. Syntaxcategory Field TypeCATEGORY Supported Operators
Supported Functionsn/a Examples
CommentSearch for issues that have a Comment which contains particular text. JIRA text-search syntax can be used. Note: this field does not support auto-complete. Syntaxcomment Field TypeTEXT Supported Operators
Supported Functionsn/a Examples
ComponentSearch for issues that belong to a particular component of a project. You can search by component name or component ID (i.e. the number that JIRA automatically allocates to a component).
Note: this field supports auto-complete. Syntaxcomponent Field TypeCOMPONENT Supported Operators
Supported Functionsn/a Examples
CreatedSearch for issues that were created on, before or after a particular date (or date range). Use one of the following formats: "yyyy/MM/dd HH:mm" Or use "w" (weeks), "d" (days), "h" (hours) or "m" (minutes) to specify a date relative to the current time. The default is "m" (minutes). Be sure to use quote-marks ("); if you omit the quote-marks, the number you supply will be interpreted as milliseconds after epoch (1970-1-1). Note: this field does not support auto-complete. Syntaxcreated Alias: createdDate Field TypeDATE Supported Operators
Supported FunctionsWhen used with the EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN or LESS_THAN_EQUALS operators, createdDate supports:
Examples
Custom FieldOnly applicable if your JIRA administrator has created one or more Custom Fields. Search for issues where a particular Custom Field has a particular value. You can search by Custom Field name or Custom Field ID (i.e. the number that JIRA automatically allocates to an Custom Field).
Note:
SyntaxCustomFieldName Alias: cf[CustomFieldID] Field TypeDepends on the Custom Field's configuration Supported OperatorsDifferent types of Custom Fields support different operators. For the default Custom Field Types, the following operators are supported:
Supported FunctionsDifferent types of Custom Fields support different functions. For the default Custom Field Types, the following functions are supported:
Examples
DescriptionSearch for issues where the Description contains particular text. JIRA text-search syntax can be used. Note: this field does not support auto-complete. Syntaxdescription Field TypeTEXT Supported Operators
Supported Functionsn/a Examples
DueSearch for issues that were due on, before or after a particular date (or date range). Use one of the following formats: "yyyy/MM/dd HH:mm" Or use "w" (weeks), "d" (days), "h" (hours) or "m" (minutes) to specify a date relative to the current time. The default is "m" (minutes). Be sure to use quote-marks ("); if you omit the quote-marks, the number you supply will be interpreted as milliseconds after epoch (1970-1-1). Note that Due Date relates to the date only (not to the time). Note: this field does not support auto-complete. Syntaxdue Alias: dueDate Field TypeDATE Supported Operators
Supported FunctionsWhen used with the EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN or LESS_THAN_EQUALS operators, dueDate supports:
Examples
EnvironmentSearch for issues where the Environment contains particular text. JIRA text-search syntax can be used. Note: this field does not support auto-complete. Syntaxenvironment Field TypeTEXT Supported Operators
Supported Functionsn/a Examples
FilterYou can use a saved filter to narrow your search. You can search by filter name or filter ID (i.e. the number that JIRA automatically allocates to a saved filter).
Note:
Field TypeFILTER Supported Operators
Supported Functionsn/a Examples
Fix VersionSearch for issues that are assigned to a particular Fix Version. You can search by version name or version ID (i.e. the number that JIRA automatically allocates to a version).
Note: this field supports auto-complete. SyntaxfixVersion Field TypeVERSION Supported Operators
Supported FunctionsWhen used with the IN and NOT_IN operators, fixVersion supports: Examples
Issue KeySearch for issues with a particular Issue Key or Issue ID (i.e. the number that JIRA automatically allocates to an Issue). Note: this field does not support auto-complete. SyntaxissueKey Aliases: id issue key Field TypeISSUE Supported Operators
Supported FunctionsWhen used with the IN or NOT_IN operators, issueKey supports: Examples
LevelOnly available if Issue Level Security has been enabled by your JIRA administrator. Search for issues with a particular Security Level. You can search by Issue Security Level name or Issue Security Level ID (i.e. the number that JIRA automatically allocates to an Issue Security Level).
Note: this field supports auto-complete. Syntaxlevel Field TypeSECURITY LEVEL Supported Operators
Supported Functionsn/a Examples
Original EstimateOnly available if time-tracking has been enabled by your JIRA administrator. Search for issues where the Original Estimate is set to a particular value (i.e. a number, not a date or date range). Use "w", "d", "h" and "m" to specify weeks, days, hours or minutes. Note: this field does not support auto-complete. SyntaxoriginalEstimate Alias: timeOriginalEstimate Field TypeDURATION Supported Operators
Supported Functionsn/a Examples
ParentOnly available if sub-tasks have been enabled by your JIRA administrator. Search for all sub-tasks of a particular issue. You can search by Issue Key or by Issue ID (i.e. the number that JIRA automatically allocates to an Issue). Note: this field does not support auto-complete. Syntaxparent Field TypeISSUE Supported Operators
Supported Functionsn/a Examples
PrioritySearch for issues with a particular Priority. You can search by Priority name or Priority ID (i.e. the number that JIRA automatically allocates to a Priority).
Note: this field supports auto-complete. Syntaxpriority Field TypePRIORITY Supported Operators
Supported Functionsn/a Examples
ProjectSearch for issues that belong to a particular Project You can search by Project Name, by Project Key or by Project ID (i.e. the number that JIRA automatically allocates to a project). Note: this field supports auto-complete. Syntaxproject Field TypePROJECT Supported Operators
Supported Functionsn/a Examples
Remaining EstimateOnly available if time-tracking has been enabled by your JIRA administrator. Search for issues where the Remaining Estimate is set to a particular value (i.e. a number, not a date or date range). Use "w", "d", "h" and "m" to specify weeks, days, hours or minutes. Note: this field does not support auto-complete. SyntaxremainingEstimate Alias: timeEstimate Field TypeDURATION Supported Operators
Supported Functionsn/a Examples
ReporterSearch for issues that were reported by (i.e. created by) a particular user. You can search by the user's Full Name, ID or Email Address. Note: this field supports auto-complete. Syntaxreporter Field TypeUSER Supported Operators
Supported FunctionsWhen used with the IN and NOT_IN operators, reporter supports: When used with the EQUALS and NOT_EQUALS operators, reporter supports: Examples
ResolutionSearch for issues that have a particular Resolution You can search by Resolution name or Resolution ID (i.e. the number that JIRA automatically allocates to a Resolution).
Note: this field supports auto-complete. Syntaxresolution Field TypeRESOLUTION Supported Operators
Supported Functionsn/a Examples
ResolvedSearch for issues that were resolved on, before or after a particular date (or date range). Use one of the following formats: "yyyy/MM/dd HH:mm" Or use "w" (weeks), "d" (days), "h" (hours) or "m" (minutes) to specify a date relative to the current time. The default is "m" (minutes). Be sure to use quote-marks ("); if you omit the quote-marks, the number you supply will be interpreted as milliseconds after epoch (1970-1-1). Note: this field does not support auto-complete. Syntaxresolved Alias: resolutionDate Field TypeDATE Supported Operators
Supported FunctionsWhen used with the EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN or LESS_THAN_EQUALS operators, resolved supports:
Examples
StatusSearch for issues that have a particular Status. You can search by Status name or Status ID (i.e. the number that JIRA automatically allocates to a Status).
Note: this field supports auto-complete. Syntaxstatus Field TypeSTATUS Supported Operators
Supported Functionsn/a Examples
SummarySearch for issues where the Summary contains particular text. JIRA text-search syntax can be used. Note: this field does not support auto-complete. Syntaxsummary Field TypeTEXT Supported Operators
Supported Functionsn/a Examples
TextThis is a "master-field" that allows you to search all text fields, i.e.:
Note: The text master-field can only be used with the CONTAINS operator ("~" and "!~"). Syntaxtext Field TypeTEXT Supported Operators
Supported Functionsn/a Examples
TypeSearch for issues that have a particular Issue Type. You can search by Issue Type name or Issue Type ID (i.e. the number that JIRA automatically allocates to an Issue Type).
Note: this field supports auto-complete. Syntaxtype Alias: issueType Field TypeISSUE_TYPE Supported Operators
Supported Functionsn/a Examples
Time SpentOnly available if time-tracking has been enabled by your JIRA administrator. Search for issues where the Time Spent is set to a particular value (i.e. a number, not a date or date range). Use "w", "d", "h" and "m" to specify weeks, days, hours or minutes. Note: this field does not support auto-complete. SyntaxtimeSpent Field TypeDURATION Supported Operators
Supported Functionsn/a Examples
UpdatedSearch for issues that were last updated on, before or after a particular date (or date range). Use one of the following formats: "yyyy/MM/dd HH:mm" Or use "w" (weeks), "d" (days), "h" (hours) or "m" (minutes) to specify a date relative to the current time. The default is "m" (minutes). Be sure to use quote-marks ("); if you omit the quote-marks, the number you supply will be interpreted as milliseconds after epoch (1970-1-1). Note: this field does not support auto-complete. Syntaxupdated Alias: updatedDate Field TypeDATE Supported Operators
Supported FunctionsWhen used with the EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN or LESS_THAN_EQUALS operators, updated supports:
Examples
VotesSearch for issues with a specified number of votes. Note: this field does not support auto-complete. Syntaxvotes Field TypeNUMBER Supported Operators
Supported Functionsn/a Examples
Work RatioOnly available if time-tracking has been enabled by your JIRA administrator. Search for issues where the Work Ratio has a particular value. Work Ratio is calculated as follows: workRatio = timeSpent / originalEstimate) x 100 Note: this field does not support auto-complete. SyntaxworkRatio Field TypeNUMBER Supported Operators
Supported Functionsn/a Examples
Functions ReferencecascadeOption()Search for issues that match the selected values of a 'cascading select' custom field. The parentOption parameter matches against the first tier of options in the cascading select field. The childOption parameter matches against the second tier of options in the cascading select field, and is optional. The keyword "none" can be used to search for issues where either or both of the options have no value. SyntaxcascadeOption(parentOption) or cascadeOption(parentOption,childOption) Supported Field TypesCASCADING_OPTION Supported Operators
Examples
currentUser()Perform searches based on the currently logged-in user. Note that this function can only be used by logged-in users. So if you are creating a saved filter that you expect to be used by anonymous users, do not use this function. SyntaxcurrentUser() Supported Field TypesUSER Supported Operators
Examples
issueHistory()Find issues that you have recently viewed, i.e. issues that are in your History drop-down. Note:
SyntaxissueHistory() Supported Field TypesISSUE Supported Operators
Examples
linkedIssues()Perform searches based on issues which are linked to a specified issue. You can optionally restrict the search to links of a particular type. Note that LinkType is case-sensitive. SyntaxlinkedIssues(issueKey) or linkedIssues(issueKey,linkType) Supported Field TypesISSUE Supported Operators
Examples
membersOf()Perform searches based on the members of a particular group. SyntaxmembersOf(Group) Supported Field TypesUSER Supported Operators
Examples
now()Perform searches based on the current time. Syntaxnow() Supported Field TypesDATE Supported Operators
Examples
releasedVersions()Perform searches based on the released versions (i.e. versions that your JIRA administrator has released) of a specified project. You can also search on the released versions of all projects, by omitting the project parameter. SyntaxreleasedVersions() or releasedVersions(project) Supported Field TypesVERSION Supported Operators
Examples
standardIssueTypes()Perform searches based on "standard" Issue Types, that is, search for issues which are not sub-tasks. SyntaxstandardIssueTypes() Supported Field TypesISSUE_TYPE Supported Operators
Examples
subtaskIssueTypes()Perform searches based on issues which are sub-tasks. SyntaxstandardIssueTypes() Supported Field TypesISSUE_TYPE Supported Operators
Examples
unreleasedVersions()Perform searches based on the unreleased versions (i.e. versions that your JIRA administrator has not yet released) of a specified project. You can also search on the unreleased versions of all projects, by omitting the project parameter. SyntaxunreleasedVersions() or unreleasedVersions(project) Supported Field TypesVERSION Supported Operators
Examples
votedIssues()Perform searches based on issues for which you have voted. Note that this function can only be used by logged-in users. SyntaxvotedIssues() Supported Field TypesISSUE Supported Operators
Examples
watchedIssues()Perform searches based on issues which you are watching. Note that this function can only be used by logged-in users. SyntaxwatchedIssues() Supported Field TypesISSUE Supported Operators
Examples
Supported Field TypesISSUE Supported Operators
Examples
Setting Precedence of OperatorsYou can use parentheses in complex JQL statements to enforce the precedence of operators. For example, if you want to find all resolved issues in the SysAdmin project as well as all issues (any status, any project) currently assigned to the system administrator (bobsmith), you can use parentheses to enforce the precedence of the boolean operators in your query, i.e.: (status=resolved AND project=SysAdmin) OR assignee=bobsmith Note that if you do not use parentheses, the statement will be evaluated left-to-right. You can also use parentheses to group clauses, so that you can apply the NOT operator to the group. Performing Text SearchesYou can use Lucene's text searching features when performing searches on the following fields:
For details, please see the page on Performing Text Searches, which includes the following sections: Using Auto-completeAs you type your query, JIRA will recognise the context and offer a list of "auto-complete" suggestions as follows: The list of auto-complete suggestions is displayed alphabetically and includes the first 15 matches. Note that auto-complete suggestions are not offered for function parameters.
Auto-complete suggestions are not offered for all fields. Check the fields reference to see which fields support auto-complete. If you type a space at the start of your query......JIRA will offer a list of all available fields, e.g.: If you type one or more characters......JIRA will offer a list of matching fields, e.g.: If you type a field then a space......JIRA will offer a list of valid operators, e.g.: If you type a field, then an operator, then a space......JIRA will offer a list of valid values, e.g.: If you type a field, then an operator, then one or more characters......JIRA will offer a list of valid values (if your field supports this) and valid functions for the field/operator combination, e.g.:
Switching between 'Advanced' and 'Simple' SearchIn general, a query created using 'Simple Search' will be able to be translated to 'Advanced Search' (i.e. JQL), and back again. However, a query created using 'Advanced Search' may not be able to be translated to 'Simple Search', particular if:
Reserved CharactersJQL has a list of reserved characters. These characters need to be surrounded by quote-marks if you wish to use them in queries:
If your search term contains a quote-mark, you will need to precede it with the escape character (back-slash), e.g.: "Type your name in the \"Login\" box" If you use a single quote to escape your search term, then you can use the double quote (without escaping it) inside the single quotes; but you will have to escape any other single quotes. And vice-versa. Reserved WordsJQL has a list of reserved words. These words need to be surrounded by quote-marks if you wish to use them in queries: "abort", "access", "add", "after", "alias", "all", "alter", "and", "any", "as", "asc",
(Note for JIRA administrators: this list is hard coded in the JqlStringSupportImpl.java file.) ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Oct 06, 2009 00:25 |