Changing the Label for a Field

You can customize a label for a work item type field by exporting the XML file and modifying its content. As soon as you have modified the label, you can import the XML file to start to use the updated work item type.

Required Permissions

To perform this procedure, you must be a member of the Team Foundation Administrators group or a member of the Project Administrators group for the project. For more information, see Team Foundation Server Permissions.

To customize a field label

  1. If you are modifying a work item type on a single project, run witadmin exportwitd to export the XML file for the work item type you want to modify. For more information, see Export and Import Work Item Types from an Existing Project.

  2. In Visual Studio, click File, click Open, and then click File.

    This displays the Open File dialog box.

  3. Under Look in, move to the location where you exported the file.

    If you are modifying a work item type to customize a process template, move to the location where you downloaded the process template.

    Note

    If you are running Windows Vista you might not have access rights to certain folders. If you try to export the work item type to a location where you do not have access rights, the registry virtualization technology automatically redirects the exported file and saves it to the virtual store. To avoid this redirection, you can export the file to a location where you have access rights. For more information about registry virtualization, see the following pages on the Microsoft Web site: Registry Virtualization and Common file and registry virtualization issues in Windows Vista.

  4. Select the work item type XML file that you want to update, and then click Open. When you are prompted about line endings, click No.

  5. In the <FORM> and <Layout> sections, find the definition of the field you want to modify. This example modifies the Title field:

    <Column PercentWidth="70">
      <Control Type="FieldControl" FieldName="System.Title" Label="Title" LabelPosition="Left" />
    </Column>
    
  6. Change the label for the field so that the Portuguese branch office working on this particular team project can read the name of the Title field when they work with the work item form. Modify the XML, shown as highlighted in the following example, by adding the Portuguese word for "Title" to the field label in parentheses.

    <Column PercentWidth="70">
      <Control Type="FieldControl" FieldName="System.Title" Label="Title (Título):" LabelPosition="Left" />
    </Column>
    
  7. On the toolbar, click Save to save the changes to the XML file.

  8. To import the new work item type to a single project, see Export and Import Work Item Types from an Existing Project. To add the work item type to your process template, see Add Type Definitions for Work Items to a Process Template.

To verify changes imported to a single project

  1. In Team Explorer, click Refresh to download the latest updates from the server.

    These updates include the changes that you just imported. Wait several seconds until all the nodes are loaded. Nodes that are still loading are labeled working.

  2. Create a new work item by using the work item type you modified. To do this, right-click the Work Items node, point to Add Work Item, and then click the work item type.

    This work item is created from the work item type that you changed and imported.

    Notice the new parenthetical Portuguese label for the Title field.

  3. Click Close to close the new Special Task. Click No when you are prompted to save the work item.

  4. Right-click the Work Items node again and select Add Query to create a new query.

  5. Click the area labeled Click here to add a clause to add a new row.

  6. Select the blank Field cell.

  7. Type Title into the cell.

  8. Press Enter.

    Notice that the Title field still appears without the Portuguese label in the query grid and results list column.

    Note

    Customizing the label is useful for making isolated changes to a specific team project's work item forms, as it affects neither other team projects, nor results list column labels, nor the query grid, as shown in the last few steps. These labels are shared across the Team Foundation Server and are derived from the fields' names.

  9. Click Close to close the new query. Click No when you are prompted to save the query.

See Also

Tasks

Changing the Work Item Form Layout

Concepts

Designing the Layout of the Work Item Form

Specifying Work Item Form Controls

All FORM XML Elements Reference

Designing and Customizing a Work Item Form