Queries
Queries are similar to the quick search, but have several features that make them
more powerful. A quick search is a great way to find something once, but you can
save a query and return to it again and again. Access your queries by clicking the
button in the ribbon bar.
This opens the "TeamSpec Query Manager" with which you can run queries, create new
queries, and manage existing queries.
My Queries vs. Team Queries:
There are two different locations for queries in a given project. If you open a
project node in the query index, you will see that it contains "My Queries" and
"Team Queries." My Queries is the home for local, individual queries: they are saved
on your machine and accessible only to you. Team Queries are global: they are stored
on the server, and visible to everyone with project access.
Creating New Queries:
To create a new query, highlight the location where you want to save your query,
either "My Queries" or "Team Queries," and then click the "New" button in the Query
Toolbar. Or right-click on the location you want to save the query and select "Create
New Query."
This will open a new, blank query in the right side of the Query Manager.
There are three query types that you can select from the drop-down menu. "Flat List
of Work Items" is the default and will search all of the work items in the chosen
project. "Work Items and Direct Links" and "Tree of Work Items" allow you not only
to specify search parameters for work items, but also for the work items they are
linked to.
There are four adjustments to the search parameter: And/Or, Field, Operator, and
Value. And/Or designates a Boolean Operator. Choosing "And" narrows your search,
requiring that results have this and that. Choosing "Or" broadens your search, only
requiring that results have this or that. The "Field" category specifies which fields
of the work items you will be searching. "Operator" designates how the information
in a specific field of a work item must compare to "value" that you input as a search
term. You may add a new clause to refine your search parameters by clicking in the
empty row beneath the existing clauses. You can delete a clause by right-clicking
on the grey box on the far left of its row and selecting delete. Once you have filled
out your initial parameters, click "Run Query." If you have found the set of work
items that you desired, you may save the query and close the query manager.
Editing Queries
To edit a query, simply open it in the query manager and make your changes. Save
the query to finish. To delete a query, right-click on it in the index of the query
manager and select "Delete."
Customizing the View of Query Results:
Different information is important to have right in front of you for different queries.
TeamSpec allows you to customize the information listed in query results on a query
by query basis. To do this, select a query from the index of the query manager.
Right-click in the results field and select "Column Options..."
Filter setting are at the top of the window. You can thin your results by choosing
a specific project and a specific work item type to search within. The manner in
which your results are displayed can be customized below. On the left there is a
list of available work item fields; on the right is a list of the work item fields
that are already displayed as columns of information in the search results. Highlight
a field and click the arrow in the middle to move it from one list to the other.
To change the width of a column, highlight it and enter a new value for its width.
In addition to choosing what information is displayed in your search results, you
can specify how your results are sorted. Click on the "Sorting Tab" in the Column
Options window.
Again, available fields are in a list on the left, selected fields on the right.
Whichever work item field you have selected will designate the order in which your
query results are returned. To change from an ascending sort to a descending sort,
or vice versa, highlight the selected field and click either the A-Z button or the
Z-A button. '
Additional Topics
Send questions or comments about this topic to TeamSolutions