Helpful TFS Queries for the Dynamics AX Developer
TFS can be a wonderful tool for the Dynamics AX Developer to help track bugs, tasks, etc. If it is used correctly, it can greatly increase your productivity. To learn more about the setup and use of TFS Code Repository and Dynamics AX see this post.
Disclaimer #1: I will not be writing on the Source Control functionality of TFS in this blog).
Disclaimer #2: I will not be writing on the Source Control functionality of TFS into AX. If you would like, you can find more information on this topic in this post: AX and TFS in Daily Development Activities
The most helpful thing you’ll need is queries. Lots and lots of queries. Queries will be your lifeline into TFS. In practice, I have a plethora of queries I create at the start of the project. Here is a list of a few of the ones you may want to consider as well:
“Tasks for Sprint X”: I create a query for each Sprint “All DEV Tasks” “Active Bugs” “Resolved Bugs” “All Bugs” “My Sprint Work Items” “Change Request for DEV” (If your organization uses Features instead of Tasks, just change the wording above.)
If you haven’t created a query in TFS before it is pretty simple.
Make sure you are in the Work Items area. From there simply click the New Query button and you will be presented with screen above. Now it is just a matter of filtering down your results.
Here are a couple of examples of queries:
This query is a bit more interesting as you can see that TFS allows us to group criteria together. To accomplish this, simply select all the rows you want to group, right-click, and select “Group Clauses”.
Once you have created your queries, simply click the “Save Query” button and put it wherever it belongs. You will notice in the Save dialog that there are two main folders you can save your queries. A “My Queries” folder and a “Shared Queries” folder. As it implies, the “My Queries” folder only you have access to. The “Shared Queries” folder is shared among all TFS users. This is a nice place to put a majority of these queries so that everyone can easily see them.
The other thing you may notice is that by default there is a “My Work Items” query in the “Shared Queries” folder. This query will show you everything that is currently assigned to you.
First, notice it uses the keyword @Me. This indicates the current logged in user. As such, you should be very wary of changing this query as it will affect everyone. To get around this, I create a “My Sprint Work Items” query. It essentially is a copy of the “My Work Items” query with a few other pieces added in.
You can see that I’ve added the “Assigned To” to be myself (you could leave it as @Me as well though) and I’ve added a filter on the Iteration Path (aka current Sprint/workflow, etc). Feel free to personalize this one as much as necessary. The important part of this query is that it will not be saved in the “Shared Queries” category, but in the “My Queries” folder instead.
Now that you have created all your queries, all of the wonderful data housed in TFS is easily at your fingertips. Simply double click on a query and up comes your results set. From here you can sort, add columns, filter to your hearts content!
Hopefully, you can see the usefulness of all of this. As you go through the project you can easily find bugs and the given state of a bug, FDD/Tasks become easier to track, and finding your work is easier than ever.