Upgrade TFS 2013 Reports
For some organisations the Stakeholder licence that was introduced for on premises TFS 2013 with Update 4 probably means that an increasing number of individuals are interacting with TFS. Inevitably this leads to more people asking the question "What reports can we have?".
Most TFS administrators will of course know that TFS ships with reports written for SQL Server Reporting Services (SSRS) out of the box. What might be less obvious is that the reports were updated with TFS 2013 Update 3. There is a gotcha though, in that reports that have already been deployed for existing projects do not get upgraded. However, help is at hand with a utility that can upgrade deployed reports. In this post we look at the steps to run the utility, which will upgrade TFS 2013 reports associated with Team Projects created in TFS 2012 through to TFS 2013 Update 2. Team Projects created after Update 3 was installed will of course already be on the new version.
The process isn't complicated but it's worth explaining the big picture. The TFS Reporting Bulk Update Tool is a PowerShell script that takes the URI of a Team Collection as its parameter and, in conjunction with Team Project process templates, creates a file that contains a Team Foundation Power Tool Command Line (tfpt.exe) command that actually performs the upgrade. The process can be performed on a developer workstation with http(s) access to TFS but appropriate permissions will obviously be required.
- Your TFS 2013 instance must be at Update 3 or later.
- You must have installed the Team Foundation Server 2013 Power Tools on the machine where you will perform the process.
- On the machine where you will perform the process create a working folder eg C:\ReportUpdate.
- Download, unblock and unzip ReportingBulkUpdateToolForTfs2013.ps1 to this folder from its location on CodePlex.
- Download the process template(s) that have been specified for the Team Projects in the Team Collection you are upgrading:
- Open up PowerShell ISE (or other PowerShell editor of choice) as Administrator and change directory to the working folder.
- Construct and run a PowerShell command based on ReportingBulkUpdateToolForTfs2013.ps1 appropriate to the Team Collection you are working against, for example:
PowerShell1.\ReportingBulkUpdateToolForTfs2013.ps1 -ProjectCollectionUri "http://almtfsadmin:8080/tfs/PrmCollection"
- If there were no errors the preceding command should have created BulkUpload.cmd in C:\ReportUpdate. This can now be run from the PowerShell command line using Invoke-Item .\BulkUpload.cmd.
- You can verify if the update was successful by navigating to the SSRS report portal in a browser (something like this: http://almtfsadmin/Reports/Pages/Folder.aspx?ItemPath=%2fTfsReports%2fPrmCollection%2fContosoUniversity) and switching to Details View:
- In Details View you can examine the Modified Date column which should show the date and time you ran BulkUpload.cmd. Of course, whether anything actually changed will depend on whether the reports were created before TFS 2013 Update 3 was applied.
- Finally, you should of course check that the reports still actually work.
Do take the time to read the opening comments of ReportingBulkUpdateToolForTfs2013.ps1 because there are some caveats that you need to consider. In particular is that if you have made any customisations to the report or to data sources they will be overwritten. Hopefully you will have any customised reports saved in version control but as always it would be wise to take a backup.
Cheers -- Graham