Posts

Find all TFS work items for which the original estimate has been changed

You might find yourself having to track down bad practices (like modifying the original estimate of a task). You could setup an alert to be notified as soon as it happens or you can monitor changes through the TFS database. Today, I'll explain how to monitor using a query on the TFS database. We will use the collection database. The idea is to use the views related to work items and their history. The first step is to union the data sets (the current work item states and the past work item states). Then we select the record having an original estimate higher than the previous version. THAT is the tricky part. I used the LAG analytic function to get the reference to the "previous" record (that is, the same id but the previous revision). Here is the complete statement. WITH AllData AS (   SELECT *     FROM [Tfs_DefaultCollection].[dbo].[WorkItemsAreUsed]    UNION *     FROM [Tfs_DefaultCollection].[dbo].[WorkItemsWereUsed] ), AllDat...

Microsoft Visio and Azure

If you find yourself having to create diagrams for Cloud architectures in Visio, there are nice stencils from Microsoft with all the Azure services ! Here is the download link

Migrate TFS "Repro Steps" field to the description

I recently decided, for a specific team project, to use the Description field instead of the Repro Steps field in the Bug work item. The main reason is to be able to create reports for both Product Backlog Items and Bugs, while being able to display the full description. The first step was to migrate the content of the Repro Steps field into the Description field in order to retain data for existing items. Since it is not possible to do field-to-field bulk update from the Web interface, I had to create a small console application to copy the data. The main problem I encountered was about inline images. When you copy and paste a screenshot into an HTML field, it creates an img tag with Base64 data in the src attribute. For an unknown reason, when the data in the src exceeds a certain limit (I don't know the actual value), the src attribute is blanked during the save. Images simply appear blank in the target field. After some search, I came across this post from René van Osnab...

Useful fields in the TFS Database

If you ever need to retrieve the parameters (and respective values) of a test case (for reporting purposes for example), the database table to read is Tfs_<CollectionName>.dbo.WorkItemLongTexts . It contains the HTML/XML field values for each workitem. The only missing part is the ID of the actual field you want to retrieve : FldId 10018 contains the definition of the parameters FldId 10029 contains the values of the parameters

Deploy an ASP.NET MVC Web Application to Azure Website using Release Management for TFS

Image
There are a lot of articles about the integration of an Azure VM into Release Management for TFS. What if you simply want to deploy an ASP.NET MVC application without the need to provision a dedicated machine. It turns out to be quite simple. One of the most efficient way to do it is to create the initial deployment from Visual Studio and then pick up the piece to build a RM template. My Web Application is quite simple: a database, a Entity Framework Code First model all sitting inside the ASP.NET MVC application. Like all deployments, the main process is: - generate the Web Deploy Package with placeholders for configuration (connection string, parameters, etc.) using TFS Build (or whatever build system you have). - Deploy to the staging machine (using a agent-based or agent-less machine) - Run the MS Deploy CMD file with the appropriate parameters to trigger the deployment on Azure. The reason I use a staging machine as the basis for the CMD is that it allows me to restrict th...