Introduction to Work Item Charting

How would you like to visualize your work item progress on your project home page? One of the features in Visual Studio Online and TFS 2013 is Work Item Charting. These charts can be created from flat list work item queries (tree and direct links queries are not supported) and pinned to your project home page. In this post I will walk through creating a work item query, adding a chart, and pinning it to your project home page.

Let’s get started by creating a work item query that we would like to visualize. I will create a “Sprint Work” Shared Query that will bring back all Task Work Items in my current Sprint.

clip_image002

At this point I can pin the results to the project home page, which will show the Count of items returned. That is useful in some cases, but I would like to display further detail about the work items returned by my query. To show that detail, I will create a Chart by selecting the ‘Charts’ option.

clip_image004

Once on the ‘Charts’ view, I will create a ‘New Chart’.

clip_image006

On the ‘Configure Chart’ view I have several options. First, I can pick the type of Chart to display. In this case I will select the ‘Pie’ chart. I will then select ‘State’ to ‘Group By’. As you can see, I can also group by Work Item Type (which will not be helpful for me since my query only returns ‘Task’ work item types) and by Assigned To. I also have options on how the chart should be sorted. In this case I will select ‘Label’ so that my chart will continue to display consistently when the values change.

clip_image008

As you can see above, the chart is updated as we modify the parameters. Once I am done making the changes, I will select ‘OK’ to save the chart and return to the ‘Charts’ view. Several charts can be created for a single work item query.

Next, I will pin the chart I just created to my project home page. To do that, I will hover over the chart so that ellipses display in the top right corner. I will then click on the ellipses to display options that are available to configure the chart.

clip_image010

From here I will select ‘Pin to homepage’ to pin this chart to my project home page. To view the chart, navigate to the project home page.

On the project home page, I have the flexibility to move my pinned items around so that they display in a way that work for you. To customize the display, just click on the pinned item and move it to a new location using drag and drop.

Configure TFS connection for Visual Studio Release Management (InRelease)

Open Release Management Client and select Administration tab. Select Manage TFS.

clip_image002

Select New to add a new TFS Connection and specify the TFS Server.

clip_image004

Once all information is filled out, select ‘Verify’. A common error that occurs is the Access Denied error.

Access Denied: ReleaseUser needs the following permission(s) to perform this action: Make requests on behalf of others.

This error occurs if the user being used does not have the right permissions in TFS. To configure the permissions, a user or a windows group must be added to the Project Collection Administrators group and granted Make requests on behalf of others permission.

Add User or Windows Group to Project Collection Administrators.

clip_image006

Grant Make requests on behalf of others permission to the user or windows group.

clip_image008

Once above steps are completed, the connection can be verified and saved.

Sign Silverlight XAP with TFS Build

I have a Silverlight application that is set up for Continuous Integration with Team Foundation Server. As part of the build, I needed to sign the XAP with a certificate. To accomplish this I will be using a command line tool SignTool.exe. The tool is automatically installed with Visual Studio and it has to exist on the TFS Server.

Steps below walk through the setup process.

1) Check-in the certificate into TFS. This must be done so that the build server downloads it into the workspace.

2) Update the Post-build event on the Silverlight project

In Project Properties, select ‘Compile’ option, then select the ‘Build Events…’ button.

image

We will be modifying Post-build event command line.  Select the ‘Edit Post-build …’ button.

clip_image004

Enter the SignTool command to execute:

"C:\Program Files (x86)\Windows Kits\8.0\bin\x86\SignTool.exe" sign /v /f
$(SolutionDir)\..\MyCert.pfx /p CertPassword $(TargetName).xap

Specify the path to the certificate relative to the solution directory so that it can be found during the Build.

3) Verify that your build definition is set up to download the certificate into its workspace.

TFS Check-in Policy

When using TFS as part of your ALM solution, you may want certain conditions to occur with every check-in. For example, you may want to force developers to associate work item(s) with every changeset check-in. You are able to accomplish this through the use of the TFS Check-in Policy.

TFS 2012 Check-in Policies are as follows:

  • Builds Policy
  • Changeset Comment Policy
  • Code Analysis Policy
  • Work Items Policy

If you download and install TFS 2012 Power Tools, you will also get the following Check-in Policies:

  • Custom Path Policy
  • Forbidden Patterns Policy
  • Work Item Query Policy

In order to use the policies from the Power Tools, each client machine must have TFS 2012 Power Tools installed.

Below are the steps to set up a Check-in policy in Visual Studio 2012:

1) From Team Explorer, select the project and click on the “Settings” option.

clip_image002

2) Select the “Source Control” option

clip_image004

3) Select the “Check-in Policy” tab and click on the “Add” button. You will be presented with available check-in policies.

clip_image006

4) Choose a policy and click the “OK” button.

To add more than one check-in policy to the project, simply repeat steps 3 and 4.