Use a query to retrieve a set of work items that meet specific
conditions.
About this task
When you create a query you specify the conditions and the
work item properties to display in the results table. You can create
the query for your own use or for shared use among team members.
- Click the Work Items link.
- In the navigation pane on the left, click Create
New Query.
- In the query editor, if you plan to save the query, enter
a name for it in the Name field.
- In the Conditions tab, click the
plus sign icon, then select an attribute that you want to use as a
query condition. Click Add attribute condition.
Specify the value or condition that must be met for the attribute.
For example, for the Due Date attribute you can use a specific date
or a relative date, such as 15 days from now. If you select or specify
more than one value, they are joined by OR statements, meaning that
the condition is true for any one of those values. You can add groups
of conditions by clicking Add OR Condition.
For each group, click All must match or Any
can match. Use AND when all of the conditions you specify
must be met for the query to return a work item. Use OR when any one
of the conditions must be met. Queries for string-based fields, such
as Summary and Description, are case-insensitive.
- Click the Details tab. Enter a description
of the query so that other users can understand what work items the
query returns without having to read the Conditions tab.
By default, new queries are private. To share a query with members
of a team, click and select a team. To share a query with a specific
user, click and
select the user.
- Click the Result Layout tab. In
the Result Columns section, use Add
Column and Remove controls to specify
the attributes that you want to appear as column headings in the query
results grid. Use the Up and Down controls
to arrange the columns in the results grid. To specify the order in
which results should be displayed, click Add Sort Column and
select an attribute. You can set the sort direction to Ascending or Descending for
each attribute.
- Click Run to run the query. Click Save to
save the query.
Results
If you do not share the query, or if you share it with a user,
it appears in your
My Queries folder. If you
share the query with a user, the query also shows up in folder in that user's Jazz™ client.
If you share the query with a team, it shows up in the team area folder
in the Shared Queries folder.