Queries

You can query Vault Professional work items by any field or combination of fields. For instance, you could query on all Open bugs assigned to UserA with a Milestone of Release 2.0. You can save a query that you plan to run on a regular basis. It is possible to copy query results in the Vault Professional GUI Client and save them in a spreadsheet program. Queries are a quick way to get an overview of your progress or find work items which meet a set of criteria.

Note: You can also query work items in the Vault Professional Item Tracking web client, and save the query results as a tab-delimited file.

Performing Queries

To perform a new query, choose (Project Name)->Query from Vault Professional Work Item Tracking Tree. You can also right click on the Queries node and select Add.  This will display the Query editor.  Select your Search Criteria, then click the Run button. The query results will be displayed in the Query Results table.  

The search will be limited to items in the current Vault Professional Work Item project.

You can filter your search by Keyword, Search Area, Data Field, Tags and Dates.  

For example, suppose that you want to find all high priority work items related to Client installation registry issues and assigned to Joe.  Select the relevant fields and values, click Run to run the query. Click Save to save the query.

If one of the Dates is checked, the query filters by date in addition to the Data Fields and Keyword criteria selected. A Date query will include items Added, Updated, or Commented during the given dates based on what the user selects for the Search Area checkboxes.

Saving Queries

If you perform a certain query regularly, it may be helpful to save that query as a custom query for easy access later.  For example, you may want to have quick access to open items assigned to you for a certain milestone, or items assigned to you in a particular category, etc. Any query can be saved by clicking the Visual Studio File->Save menu from the Query Editor view.  

If you are saving a new query, you will be prompted for a name for the query.  Enter the query name then press OK.  After the query is saved, it will be listed in the Queries folder for the project.  

Modifying Saved Queries

To modify a saved query, click Queries-> (saved query name)->Edit.  The query will be displayed in a Query Editor.  Make any changes then save by clicking the File->Save menu.

Deleting Saved Queries

To delete a saved custom query, select the query and choose Delete from the context menu.

Query Results Table

Results from new queries, standard queries, and saved custom queries are displayed in the query results table. Double-clicking an item in the results table displays that item in the item editor.  

Clicking a column in the table header sorts the items in the list by that column.

The query results can be refreshed by clicking the Refresh button on the Vault Professional Work Item toolbar.  

Refreshing Query Results

Query results are refreshed each time the Results editor is reactivated.  To refresh the results on a new query, choose Refresh from the Vault Professional Work Item Toolbar. The results of a standard or saved query also can be refreshed by clicking Refresh from the saved or custom query view’s context menu. For example, to refresh an open “My Open” query, choose (Project Name)->Queries->My Open->Refresh.