Let’s get started with some easy queries that build on each other. Start with one clause, test it to make sure it returns the expected results, than keep adding additional clauses until you get to the information you’re looking for.
Single clauses
Items in spaces
Items in one or more spaces. Use a space’s key (Ex: DEV) or long name (Ex: Development).
Items in (or not in) a specific space category. I love the “category” clause because it includes or excludes lots of items at one time.
-
category = Department
-
category != Department
-
category is not empty
Items of a type
Items of a specific work type.
Use the built-in subtaskIssueTypes function to return items of any child work type.
Multiple clauses
You can combine multiple search clauses by adding “AND” or “OR” between them. Add as many clauses as you need to get the data you’re after.
Next, try changing “AND” to “OR” to see how that affects the results. In the example, the OR clause means all Bugs will be returned plus all items in the Done status will also be returned. The scope of an “OR” query is much larger.
Use the was or changed operator to find items that were previously in a state.
-
type = Bug AND status WAS Done
-
type = Bug AND status WAS Done AND status = Reopened
-
type = Bug AND status CHANGED AFTER -2w
-
type = Bug AND status CHANGED TO "On Hold" DURING ("2026/01/01", "2026/12/31")
-
type = Bug AND status WAS "On Hold" DURING ("2026/01/01", "2026/12/31")
Clause Precedence
Use parenthesis symbols to group clauses and enforce precedence. This example returns all Bugs in either of the specified statuses.
This next example, without parenthesis, is evaluated left to right and returns all Bugs in the first status and items of all types in the second status. The scope of this query is much larger.
Back to intro or article list