This post is the third post out of Five that builds the Work Items Basic Guide. See the first post: “Team System Work items Basic User Guide – Introduction”
I have already published the “Team System Work Items Basic User Guide – Create New Work Items”
On this post I will talk about Queries.
In order to see the Work Items you have entered to the Team System you will need to create a "Search", the way you search the Team System is by Queries.
Queries contains filters, you can put filters on each of the Work Item fields.
There Are two groups of queries:
- Team Queries – These queries are available to the entire group and are created and modified by the Project Administrator.
- My Queries – These are personal queries that will be available to me only and are created and modified by the user.
In order to create a query do the following:
Step 1: Right Click the "Work Item" folder in the Team Explorer and choose "Add Query"
There are two sections in the Query editor window:
1. Filters Section – where you can add filters to your query, filters can be added to every field exist in you work item type.
2. Results Section – Where you will see the results of the query you build.
Step 2: Add filters to the query, in case you like to see all the Work Items that are in the system don't add any filters just run the query with the default Team Project filter.
For this example I have added the "Work Item Type" filter, I have set it to be "Task".
Note: The default filter just set the Team Project contexts of the query, @Project means the project I am in now.
Step 3: When you have finished setting the filters run the query to see if you get the results you need, click the "Run" button from the menu.
You get a list of work items that answers the filters you have just set.
Step 4: By default you get the ID and the Title columns in the results window, in order to change that right click one of the columns and choose: "Column Options…".
Step 5: From the left hand side choose each of the fields you like to see in the results window and pass them to the right hand side of the window, you can also choose their locations by using the arrow buttons located next to the left hand side of the window and you can also control their default width by changing the value in the text box under the arrow buttons.
I have chosen to see the "Work Item Type" in this example the result is the "Work Item Type" column.
Step 6: When ready save the query by clicking the "Save" button.
The save window gives 3 save options:
- Save to Team Queries – Only administrator can use this option.
- Save to My Queries – Default and most used option, saves the query so it will be available to me only.
- Save to File – When you will like to pass a query to other team members you can use this option to export a query.
In this example I have saved the query to My Queries section.
Now that you have a saved query you can do three things:
- Run the query – Double click the query.
- Delete the query – Right click the query and choose "Delete".
- Edit the query – Follow these steps:
Step 1: Right click the query and choose "View Query".
Step 2: Make changes.
Step 3: Save changes
As you can see, managing queries is very simple and intuitive.
Now that you know how to create and manage queries you can get to the information stored in the Team System in an easy and comfortable way.
Have Fun!!!