Partilhar via


FAQ on the Sample Script to Enable New Features in Upgraded Team Projects

As a follow up to my previous blog post that talks about the sample script to enable new features in upgraded team projects, I wanted to answer a couple of questions and go into a little bit more detail.

 

Frequently Asked Questions

Do I need to run this script on my Team Foundation Server machine?

No, the script can be run on any machine where you either have Team Explorer 2010 or Team Foundation Server 2010 installed. Make sure you edit EnableFeatures.bat file to specify the path to the witadmin.exe utility as it might be on different locations depending on whether you have TFS or Team Explorer installed.

Can I use this script against team projects created with “MSF for CMMI Process Improvement” process template?

No, the sample script is designed to work only for team projects created with “MSF for Agile Software Development – v4.2” process template and doesn’t have any modifications applied to its underlying work item type definitions.

How can I check if my team project is created with “MSF for Agile Software Development v4.2” process template?

See the section “How to Check If Your Team Project is “Unmodified” below.

How can I check if my team project is “unmodified”?

See the section “How to Check If Your Team Project is “Unmodified” below.

What if I realize that some modifications have been made to the underlying work item type definitions for my team project?

See the section “What If My Team Project is “Modified” below.

How can I undo the changes that this script makes?

1. Restore backups of your Bug, Task and Scenario work item types

You can find the backups of your Bug, Task and Scenario work item types in Backup\<ProjectName> directory. If there are multiple files, look for the ones that has the earliest date/time stamp. Import the backups back to your team project using witadmin importwitd command.

2. Delete the new work item types

The script adds the Test Case and Shared Step work item types to your team project. You can delete these work item types by running witadmin destroywitd command.

3. Delete link types

The script adds Test Case / Shared Steps and Tests / Tested By link types to your team project. You can delete these link types by running witadmin deletelinktype command.

What if my team project is “modified”?

See the next section to check if your project is “modified” or not. If you determine that your team project is modified, you have two options:

1. Run the sample script anyway

This will overwrite your modifications and you will need to re-apply your modifications to your work item type definitions after running the script.

2. Modify the script and files

  1. Examine the updated Bug, Task and Scenario work item type definitions under Agile5\TypeDefinitions directory provided with the sample script ZIP file to identify the changes to enable new features.
  2. Rename/backup the updated Bug, Task and Scenario work item type definitions under Agile5\TypeDefinitions directory
  3. Copy your own Bug, Task and Scenario work item type definitions to Agile5\TypeDefinitions directory and change the file names to UpdatedBug.xml, UpdatedTask.xml and UpdatedScenario.xml
  4. Apply the same changes you identified in #1 to your own Bug, Task and Scenario work item type definitions in Agile5\TypeDefinitions directory
  5. Run the script

3. Manually update your team projects by following the instructions in the guidance documents

See Enabling New Features of Visual Studio Team System 2010 Beta 1 in Upgraded Projects for pointers to guidance documents that explain how to enable individual features.

 

How to Check If Your Team Project is “Unmodified”

This section explains how to check if your team project:

  • was created with “MSF for Agile Software Development – v4.2” process template
  • has modifications that would complicate running the sample script to enable the new features

As a summary, you need to look at a couple of things:

  1. Check the list of available work item types
  2. Check the visual layouts for existing work item types
  3. Check the work item type definition XML files

 

For details about each step, see the sections below:

 

Step 1. Check the list of available work item types

Using Team Explorer, right click the “Work Items” node under your team project

Hover over “Add Work Item”, make the sure the list matches:

  • Bug
  • Quality of Service Requirement
  • Risk
  • Scenario
  • Task

If you have a different list of work items, it means your team project is either not based on “MSF for Agile Software Development – v4.2” process template, or you have additional work item types imported to your team project.

Step 2. Check the visual layouts for Bug, Task and Scenario work items

Bug work item type

Create a new Bug for your team project, and make sure the visual layout matches the screenshots below:

Bug layout (click to zoom):

image

 

History tab on Bug (click to zoom):

image

Links Tab on Bug (click to zoom):

image

File Attachments Tab on Bug (click to zoom):

image

Details Tab on Bug (click to zoom):

image

 

Task work item type

Create a new Task for your team project, and make sure the visual layout matches the screenshots below:

Task layout (click to zoom):

image

History Tab on Task (click to zoom):

image

Links Tab on Task (click to zoom):

image

File Attachments Tab on Task (click to zoom):

image

Details Tab on Task (click to zoom):

image

 

Scenario work item type

Create a new Scenario for your team project, and make sure the visual layout matches the screenshots below:

Scenario Layout (click to zoom):

image

History Tab on Scenario (click to zoom):

image

Links Tab on Scenario (click to zoom):

image

File Attachments Tab on Scenario (click to zoom):

image

Details Tab on Scenario (click to zoom):

image

 

If the visual layouts of your work items are different, it means the work item types on your team project has modifications.

 

Step 3. Check the work item type definition XMLs for Bug, Task and Scenario work items

Export the work item type definitions by running following commands from a computer that has the witadmin.exe utility:

witadmin exportwitd /s https://server:8080/tfs /p Project1 /n Bug /f Bug.xml

witadmin exportwitd /s https://server:8080/tfs /p Project1 /n Task /f Task.xml

witadmin exportwitd /s https://server:8080/tfs /p Project1 /n Scenario /f Scenario.xml

Note: Replace the server URL ( https://server:8080/tfs ) and project name (Project1) with your own values.

Compare the exported XML files against the ones included in the sample script ZIP file:

  • Agile5\TypeDefinitions\UpdatedBug.xml
  • Agile5\TypeDefinitions\UpdatedTask.xml
  • Agile5\TypeDefinitions\UpdatedScenario.xml

The only differences you see should be the newly added sections on updated work item type definitions for enabling new features. Such changes are enclosed between the following comments:

<!-- New fields/controls for Test Case Management –>
...
<!-- End new fields/controls for Test Case Management –>

 

<!-- New fields/controls for Agile Planning Workbook –>
...
<!-- End new fields/controls for Agile Planning Workbook -->

 

Any questions or feedback? Just send me an email.

Comments