Source Control Only Team Projects

One customization I make frequently to a TFS Team Project is to create source control + Team Build only team projects.

Reasons to do this vary, but the reason I have is that I like using the Scrum for Team System process template as a Master or Enterprise backlog and holding all work items in there. For that Team Project, I have no source control, as it is just for Work Items. Correspondingly, I need Team Projects that have no work items in them.

There are several ways to pull off a “Source Control + Build Only” TFS Team Project.

  1. Create a Process Template with no Work Items, Queries, or Reports in it and install it on the server to create new Team Projects. I have done this and it works.
  2. Spool up a Team Project using an existing Process Template . Lock down permissions on the Team Project to not allow any new Work Items to be created by anyone. This works, but is a bit ghetto, IMO.
  3. Spool up a Team Project using an existing Process Template and then pull out everything you don’t want.

This article will demonstrate how to accomplish #3.

Killing Everything But Source Control and Build

This example uses the MSF for Agile process template as the basis for the Team Project we will customize.

Creating the Team Project

  1. Create a Team Project as normal.
  2. Open Team Explorer

Delete the Queries

  1. Open PROJECTNAME |Work Items | Team Queries
  2. Highlight all the queries
  3. Right click | Delete

Delete the Reports

  1. Open PROJECTNAME |Reports
  2. Highlight all the reports
  3. Right click | Delete

Delete WI Type Definitions

Here we need to use the Team Foundation Power Tool available here. Ensure it is installed on the server and the machine you are working on to execute this work.

Create a .cmd file with the following commands in it, supplying your own params for the correct server and team project:

tfpt destroywitd /server:http://tfsrtm08:8080 /project:PS_SCC /workitemtype:Bug /noprompt
tfpt destroywitd /server:http://tfsrtm08:8080 /project:PS_SCC /workitemtype:"Quality of Service Requirement"  /noprompt
tfpt destroywitd /server:http://tfsrtm08:8080 /project:PS_SCC /workitemtype:Risk  /noprompt
tfpt destroywitd /server:http://tfsrtm08:8080 /project:PS_SCC /workitemtype:Scenario  /noprompt
tfpt destroywitd /server:http://tfsrtm08:8080 /project:PS_SCC /workitemtype:Task  /noprompt

Run that sucker!

Now, when I try to add a Work Item in the Team Project, this is what it looks like:

image

Notice there is no option for creating a new Work Item. It simply vanished!

I like to leave the ability to create queries because teams will often create queries looking back the Work Items in other Team Projects and simply use the SCC only project as a means of isolating their queries.


Posted Apr 22 2009, 01:23 PM by david-starr
Filed under:

Comments

Fire Snake wrote re: Source Control Only Team Projects
on 04-23-2009 12:52 AM

The integration of Work Items and Source Control is the killer feature of Team System.

If you need source control only, you'd probably be better off using a free solution like subversion or whatever. I mean, looking at the TFS price tag, how much upside does TFS have over (free) source control only solutions? Don't get me wrong, TFS/Team System is a freakin great product, but all of its value comes from the integration story. Since you cannot link Work Items and Changesets when managing them in different projects, the whole upside goes down the drain.

Writing such a blog entry on a respected site such as pluralsight does more harm than it helps in my eyes ...

david-starr wrote re: Source Control Only Team Projects
on 04-28-2009 11:02 PM

Did you read the reason for this? I am using a rich Process Template in another team project to manage all work items.

I absolutely agree that Work Items are a huge value proposition for the whole system, but not every situation is ready made to order.