Working With Work Item Query Clauses

You use searches, or queries, to locate work items based on the information in the work item forms. Each line of a query is called a query clause. If you think of creating a query like asking a question, the clauses are the way that you refine your question to get the best possible set of answers for you to work with. Query clauses are built using the columns in the query to find specific information in work item fields. You select the work item field in which to search, an operator that indicates how to search for the value, and then the value for which to search. You connect query clauses by using the And/Or column, choosing And if you want work items that match both clauses, or Or if you want work items that contain one or the other clause.

To get the results you want, try using the following ways in which to organize query clauses:

  • **Add, remove, and move query clauses   **Test the results as you make changes to the query to ensure you are getting the right results. You can get unexpected results when a query clause, operator, or And/Or is in the wrong place in the query.

  • **Group clauses   **Clauses can be grouped to operate as a single unit separate from the rest of the query; like putting parentheses around an expression in a mathematical equation or logic statement. Grouping clauses is useful when you are building complex queries.

  • **Copy and paste clauses   **You can copy and paste clauses to speed up the query building process.

In This Section

Viewing Work Items

Creating New Work Item Queries

See Also

Other Resources

Adding and Editing Work Items