Aracılığıyla paylaş


Walkthrough: Make Basic Customizations to a Work Item Type

In this walkthrough, you will customize an existing work item type in the most common ways. You will learn about the tools used to customize work items types and the XML language that defines these types.

These customizations are illustrated in the following procedures:

  • Create a Team Project   In this procedure, you create the team project that contains the work item types that you will work with in the subsequent procedures.

  • View a Work Item Type   In this procedure, you display the form of an existing work item type.

  • Export a Work Item Type   In this procedure, you export the definition of the work item type into an XML file.

  • Rename the Type   In this procedure, you change the XML file that contains the work item type definition to change the name of the work item type from Task to Special Task.

  • Import Changes   In this procedure, you import into Team Foundation Server the work item type that you changed in the previous procedure.

  • Add a Field   In this procedure, you add a new field that is named Category, to an existing work item type.

  • Add Rules to a Field   In this procedure, you add a rule that makes the new Category field a required field.

  • Create a Pick List   In this procedure, you add a list of allowed values for the Category field. The new values will appear as choices in a work item that is created from the work item type.

  • Change the Workflow   In this procedure, you add new states and transitions to the work item type.

  • Change the Form Layout   In this procedure, you change the positioning of fields on the work item form.

Prerequisites

To complete the steps in these walkthroughs, you will need the following:

A copy of Visual Studio Team System, or a copy of Visual Studio that has Team Explorer installed and has a connection to Team Foundation Server. For more information, see How to: Connect to Team Foundation Server.

If you can establish a connection to a Team Foundation Server and have the appropriate permissions, you can make basic customizations to a work item type at a command prompt, batch file, or script file. To do this, you must either use the Visual Studio 2008 Command Prompt utility or set several environment variables in your current command prompt by using vsvars32 as described in the following example. For more information about joining a team project, see Walkthrough: Joining a Team Project.

To enable Team Foundation commands at a command prompt

  • Click Start, click All Programs, point to Microsoft Visual Studio 2008, point to Visual Studio Tools, and then click Visual Studio 2008 Command Prompt.

Alternatively, you can run vsvars32 in the Visual Studio installation path that is usually DriveLetter:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools.

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.

Create a Team Project

To create a team project

  1. Start Visual Studio.

  2. Open Team Explorer by clicking View, and then clicking Team Explorer.

  3. In Team Explorer, right-click the name of the Team Foundation Server to which you are connected, and then click New Team Project.

  4. In the New Team Project on <Team Foundation Server name> dialog box, under What is the name of the team project?, type WITLab, and then click Next.

  5. On the Select a Process Template page, under Which process template should be used to create the team project?, click MSF for Agile Software Development - <version number>, and then click Finish.

    Creating the team project may take several minutes.

  6. When the Team Project Created page is displayed, clear the Launch the Process Guidance box, and then click Close.

    The new team project that is named "WITLab," is created and displayed in a node under your Team Foundation Server in Team Explorer.

View a Work Item Type

Prerequisite: You have completed Create a Team Project. The "WITLab" team project is available.

To view a work item type

  1. Start Visual Studio and open Team Explorer.

  2. In Team Explorer, expand the WITLab team project, and wait several seconds for its folders to load.

  3. In the team project, right-click the Work Items node, point to Add Work Item, and then click Task.

    A form that represents a new Task work item is displayed. Some of its fields contain default values. In this walkthrough, you will customize the Task work item type from which this work item was created.

Export a Work Item Type

Prerequisite: You have completed Create a Team Project. The "WITLab" team project is available.

To export a work item type

  1. Open a Visual Studio command prompt.

  2. At the command prompt, type the following and then press ENTER:

    witexport /f "File Path\task.xml" /t "Team Foundation Server name" /p WITLab /n Task

    This exports the Task work item type from the Team Foundation Server to an XML file. The following is displayed when the export operation finishes:

    Work item type export complete.

  3. (Optional) To view the XML definition for the Task work item type, type task.xml at the command prompt and then press ENTER.

Rename the Type

Prerequisite: You have completed the Export a Work Item Type procedure.

To rename the type

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

    This displays the Open File dialog box.

  2. 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. For more information, see https://go.microsoft.com/fwlink/?LinkId=92325 and https://go.microsoft.com/fwlink/?LinkId=92323. To avoid this redirection, you can export the file to a location where you have access rights.

  3. Click the task.xml file and then click Open. When you are prompted about line endings, click No.

    This opens task.xml, the XML file that contains the definition for the Task work item type.

  4. Locate the following element in the XML file.

    <WORKITEMTYPE name="Task">
    
  5. Change the value of the name attribute to Special Task.

    <WORKITEMTYPE name="Special Task">
    
  6. Save your change to a new XML file. To do this, on the Visual Studio File menu, click Save task.xml As.

    The Save File As dialog box is displayed.

  7. For File name, type specialtask.xml, and then click Save.

Import Changes

Prerequisite: You have completed the Rename the Type procedure.

To import changes

  1. Open a Visual Studio command prompt.

  2. Import the changed work item type into the Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    This imports the specialtask work item type into the Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  3. Select your team project, and then on the View menu, 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 display the word working.

  4. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

Add a Field

Prerequisite: You have completed the Rename the Type procedure.

To add a field

  1. Open the file that contains the Special Task work item type definition. To do this, in Visual Studio, click the tab labeled SpecialTask.xml.

  2. Find the following section of the XML file.

    <FIELDS>
    
  3. To create a string field that is named Category and Help text for a tooltip, type the FIELD and HELPTEXT elements, as in the following sample:

    <FIELDS>
    <FIELD name="Category" refname="MyCompany.MyProcess.Category" type="String"> 
        <HELPTEXT>Describes the category to which this special task belongs.</HELPTEXT> 
    </FIELD>
    

    Note

    The Reference Name, or refname, is the programmatic name for the field. All other rules should refer to this refname. For more information, see Field Reference Names.

  4. Find the section of the XML file that describes the work item form.

    <FORM>
    
  5. Find the following lines in the <FORM> section.

    <Group Label="Classification">
      <Column PercentWidth="100">
        <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" />
        <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" />
      </Column>
    </Group>
    
  6. To insert a control to display the Category field, type the Control element with Type="FieldControl" following the control for System.IterationPath, as in the following sample:

    <Group Label="Classification">
      <Column PercentWidth="100">
        <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" />
        <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" />
        <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" /> 
      </Column>
    </Group>
    
  7. On the File menu, click the Save to save changes to the XML file.

  8. Import the changed Special Task work item type into Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    Note   As a shortcut, you can press the UP ARROW at the command line to display the last command entered.

    This imports the specialtask work item type into Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  9. 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 the Work Items node is loaded. Nodes that are still loading display the word working.

  10. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

    Notice the new Category field on the form. Move the mouse pointer over the label of the field to see the tool tip.

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

Add Rules to a Field

Prerequisite: You have completed the Add a Field procedure.

To add rules to a field

  1. Open the file that contains the Special Task work item type definition. To do this, in Visual Studio, click the tab labeled specialtask.xml.

  2. Find the <FIELDS> section of the XML file, and in it, the Category field.

  3. To make Category a required field, add the REQUIRED element, as in the following sample:

    <FIELD name="Category" refname="MyCompany.MyProcess.Category" type="String" reportable="dimension">
    <HELPTEXT>Describes the category to which this special task belongs.</HELPTEXT>
    <REQUIRED />
    </FIELD>
    
  4. On the File menu, click the Save to save changes to the XML file.

  5. Import the changed Special Task work item type into Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    This imports the specialtask work item type into Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  6. 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 the Work Items node is loaded. Nodes that are still loading display the word working.

  7. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

    Notice that the Category field is now highlighted. This indicates that it is required.

  8. Select the Title field on the Special Task work item and type "Sample Task."

  9. On the toolbar, click Save to save the work item.

    An error dialog box is displayed that states that the Category field cannot be empty. Click OK to close the dialog box.

  10. In the Category field on the Special Task, type A category.

  11. Click Save to save the work item.

    Notice the work item can now be saved.

  12. Click Close to close the new Special Task.

Create a Pick List

Prerequisite: You have completed the Add Rules to a Field procedure.

To create a pick list

  1. Open the file that contains the Special Task work item type definition. To do this, in Visual Studio, click the tab labeled specialtask.xml.

  2. Find the <FIELDS> section of the XML file, and in it, the Category field.

  3. To add a list of allowed values for the Category field, insert the ALLOWEDVALUES element and a LISTITEM child element for each allowed value.

    <FIELD name="Category" refname="MyCompany.MyProcess.Category" type="String" reportable="dimension">
    <HELPTEXT>Describes the category to which this special task belongs.</HELPTEXT>
    <REQUIRED />
    <ALLOWEDVALUES>
        <LISTITEM value="Process Management" />
        <LISTITEM value="Planning" />
        <LISTITEM value="Execution" />
        <LISTITEM value="Review" /> 
    </ALLOWEDVALUES>
    </FIELD>
    
  4. To make Category an optional field, delete the REQUIRED element that appears above the ALLOWEDVALUES element.

    <FIELD name="Category" refname="MyCompany.MyProcess.Category" type="String" reportable="dimension">
    <HELPTEXT>Describes the category to which this special task belongs.</HELPTEXT>
    <REQUIRED />
    <ALLOWEDVALUES>
        <LISTITEM value="Process Management" />
        <LISTITEM value="Planning" />
        <LISTITEM value="Execution" />
        <LISTITEM value="Review" />
    </ALLOWEDVALUES>
    </FIELD>
    
  5. Click Save to save changes to the XML file.

  6. Import the changed Special Task work item type into Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    This imports the specialtask work item type into Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  7. In the Team Explorer window in Visual Studio, click the Refresh to download the latest updates from the server.

    These updates include the changes that you just imported. Wait several seconds until the Work Items node is loaded. Nodes that are still loading display the word working.

  8. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

  9. Click the list box for the Category field.

    Notice that the field now supports only the values specified by the ALLOWEDVALUES rules.

    Note

    The allowed values in the drop always appear in alphabetical order regardless of the order of the LISTITEM elements in the XML file.

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

Change the Workflow

Prerequisite: You have completed the Create a Pick List procedure.

To change the workflow

  1. Open the file that contains the Special Task work item type definition. To do this, in Visual Studio, click the tab labeled specialtask.xml.

  2. Find the definition of the work item type’s workflow, in the <WORKFLOW> section of the XML file, as shown in the following XML:

    <WORKFLOW>
      <STATES>
        <STATE value="Active">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
    ...
    

    Only two states are defined, Active and Closed. The transitions between these states are also defined, in addition to an opening transition from the null state that is used when the work item is created.

  3. To add an Unapproved state to the type definition, insert another STATE element above the active state.

    <WORKFLOW>
      <STATES>
        <STATE value="Unapproved"> 
        </STATE> 
        <STATE value="Active">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
    ...
    
  4. Create a transition between the null state and the unapproved state. To do this, first find the section of the workflow definition for transitions. Then, insert a TRANSITION element for the unassigned state to the Unapproved state. Because of this change, all work items of this type will start in the Unapproved state with the default reason of New.

    <TRANSITIONS>
      <TRANSITION from="" to="Unapproved"> 
        <REASONS> 
          <DEFAULTREASON value="New" /> 
        </REASONS> 
      </TRANSITION> 
      <TRANSITION from="" to="Active">
        <REASONS>
          <DEFAULTREASON value="New" />
        </REASONS>
        <FIELDS>
          <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
            <COPY from="currentuser" />
          </FIELD>
          <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
            <COPY from="clock" />
          </FIELD>
          <FIELD refname="System.AssignedTo">
            <COPY from="currentuser" />
          </FIELD>
        </FIELDS>
      </TRANSITION>
    
  5. Delete the TRANSITION element for unassigned to Active, and delete all its child elements. This transition appears in the following code sample. You delete this element because there can only be one opening transition, and you want to use an opening transition called "Ported," which you will define in the following step.

    <TRANSITIONS>
      <TRANSITION from="" to="Unapproved">
        <REASONS>
          <DEFAULTREASON value="New" />
        </REASONS>
      </TRANSITION>
      <TRANSITION from="" to="Active"> 
        <REASONS> 
          <DEFAULTREASON value="New" /> 
        </REASONS> 
        <FIELDS> 
          <FIELD refname="Microsoft.VSTS.Common.ActivatedBy"> 
            <COPY from="currentuser" /> 
          </FIELD> 
          <FIELD refname="Microsoft.VSTS.Common.ActivatedDate"> 
            <COPY from="clock" /> 
          </FIELD> 
          <FIELD refname="System.AssignedTo"> 
            <COPY from="currentuser" /> 
          </FIELD> 
        </FIELDS> 
      </TRANSITION>
    
  6. To add a "Ported" reason for the opening transition, insert a REASON element after the default reason. This lets users know whether the work item is new or was ported from another tracking system.

    <TRANSITIONS>
      <TRANSITION from="" to="Unapproved">
        <REASONS>
          <DEFAULTREASON value="New" />
         <REASON value="Ported" /> 
        </REASONS>
      </TRANSITION>
    ...
    
  7. Insert the COPY element in the following sample. This rule defaults the Assigned To field to the user who created the work item, and it is to be evaluated only during the opening transition.

    <TRANSITIONS>
      <TRANSITION from="" to="Unapproved">
        <REASONS>
          <DEFAULTREASON value="New" />
         <REASON value="Ported" />
        </REASONS>
        <FIELDS> 
           <FIELD refname="System.AssignedTo"> 
             <COPY from="currentuser" /> 
           </FIELD> 
        </FIELDS>
      </TRANSITION>
    ...
    

    Note

    Inserting this rule under other <TRANSITION> or <STATE> elements will scope the rule to other Transitions or States.

  8. To create a transition from the Unapproved state to the Active state, insert the TRANSITION element and its child elements, as in the following sample. Because of this change, when a Special Task is approved, it can undergo this transition.

    <TRANSITIONS>
      <TRANSITION from="" to="Unapproved">
        <REASONS>
          <DEFAULTREASON value="New" />
         <REASON value="Ported" />
        </REASONS>
        <FIELDS>
           <FIELD refname="System.AssignedTo">
             <COPY from="currentuser" />
           </FIELD>
        </FIELDS>
      </TRANSITION>
      <TRANSITION from="Unapproved" to="Active"> 
        <REASONS> 
          <DEFAULTREASON value="Approved" /> 
        </REASONS> 
      </TRANSITION> 
      <TRANSITION from="Active" to="Closed">
        <REASONS>
          <DEFAULTREASON value="Completed" />
          <REASON value="Deferred" />
          <REASON value="Obsolete" />
          <REASON value="Cut" />
        </REASONS>
    ...
    
  9. Click Save to save changes to the XML file.

  10. Import the changed Special Task work item type into Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    This imports the specialtask work item type into the Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  11. 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 the Work Items node is loaded. Nodes that are still loading display the word working.

  12. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

  13. Notice that the initial State is now Unapproved and that the Reason defaults to New. Additionally, the Assigned To value defaults to your account name. Click the Reason field to see a list box that lists the reasons New and Ported.

  14. In the Title field, type a title, and then click Save to save the work item. Wait until the save operation finishes, as indicated by Item(s) Saved on the status bar.

  15. In the State field, select the Active value to approve the work item and transition it again. Notice that the Reason field defaults to Approved.

  16. Click Save to save this transition.

  17. Click Close to close the Special Task.

Change the Form Layout

Prerequisite: You have completed the Change the Workflow procedure.

To change the form layout

  1. Open the file that contains the Special Task work item type definition. To do this, in Visual Studio, click the tab labeled specialtask.xml.

  2. Find the <TabGroup> section of the XML file. Notice that there are <Tab> elements for Links and File Attachments in which each <Tab>element contains a <Control> element that renders the respective control.

    <Tab Label="Links">
      <Control Type="LinksControl" />
    </Tab>
    <Tab Label="File Attachments">
      <Control Type="AttachmentsControl" />
    </Tab>
    
  3. Merge the two <Tab> elements into a single Links and Attachments <Tab> element that contains both controls by replacing the XML shown in the previous step with the new XML that follows.

    <Tab Label="Links and Attachments">
      <Control Type="LinksControl" Label="Links" LabelPosition="Top" />
      <Control Type="AttachmentsControl" Label="Attachments" LabelPosition="Top" />
    </Tab>
    
  4. Find the section of the <FORM>, <Layout> definition that describes the Classification and Status groups.

    <Group Label="Classification">
      <Column PercentWidth="100">
        <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" />
        <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" />
        <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" />
      </Column>
    </Group>
    

    Note

    For best results, every Control or Group should display in a Column even if the Column spans the full width of the form. In turn, every Column should display in a Group even if the Group has no visible label or boundary.

  5. Select the CONTROL element lines in the following sample, open the Edit menu, and then click Copy to copy this content to the Clipboard for later use.

      <Column PercentWidth="70">
        <Group>
          <Column PercentWidth="100">
            <Group Label="Classification">
              <Column PercentWidth="100">
                <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" /> 
                <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" /> 
                <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" /> 
              </Column>
            </Group>
    
  6. To remove the Classification group from its current position on the form , delete the lines in the following sample from <Group Label="Classification"> to </Group> following the <Tab Label="Details"> element.

    <Layout>
      <Group>
        <Column PercentWidth="70">
          <Control Type="FieldControl" FieldName="System.Title" Label="&amp;Title:" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="30">
          <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Discipline" Label="&amp;Discipline:" LabelPosition="Left" />
        </Column>
      </Group>
      <Group Label="Classification"> 
        <Column PercentWidth="100"> 
          <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="&amp;Area:" LabelPosition="Left" /> 
          <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="&amp;Iteration:" LabelPosition="Left" /> 
          <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" /> 
        </Column> 
      </Group>
    
  7. In the <TabGroup> section, find the following lines that define the Details tab:

    <Tab Label="Details">
      <Group>
        <Column PercentWidth="50">
          <Group Label="General">
            <Column PercentWidth="100">
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Issue" Label="Iss&amp;ue:" LabelPosition="Left" />
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.ExitCriteria" Label="E&amp;xit criteria:" LabelPosition="Left" />
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Build.IntegrationBuild" Label="Integration &amp;build:" LabelPosition="Left" />
            </Column>
          </Group>
        </Column>
        <Column PercentWidth="50">
          <Group Label="Schedule">
            <Column PercentWidth="100">
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Label="Remaining &amp;work (hours):" LabelPosition="Left" />
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.CompletedWork" Label="Com&amp;pleted work (hours):" LabelPosition="Left" />
            </Column>
          </Group>
        </Column>
      </Group>
    </Tab>
    
  8. To move these controls to the Details tab, paste the contents of the Clipboard after the <Tab Label="Details"> element.

    <Tab Label="Details">
      <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" /> 
      <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" /> 
      <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" /> 
      <Group>
        <Column PercentWidth="50">
          <Group>
            <Column PercentWidth="100">
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Issue" Label="Issue" LabelPosition="Left" />
    ...
    
  9. To create a grouping around the moved fields and to divide the fields into two columns, add the Group and Column elements, as in the following sample:

    <Tab Label="Details">
      <Group Label="Classification"> 
        <Column PercentWidth="50"> 
          <Group> 
            <Column PercentWidth="100"> 
              <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="Area" LabelPosition="Left" />
              <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Iteration" LabelPosition="Left" />
            </Column> 
          </Group> 
        </Column> 
        <Column PercentWidth="50"> 
          <Group> 
            <Column PercentWidth="100"> 
              <Control Type="FieldControl" FieldName="MyCompany.MyProcess.Category" Label="Category" LabelPosition="Left" />
            </Column> 
          </Group> 
        </Column> 
      </Group>
      <Group>
        <Column PercentWidth="50">
          <Group>
            <Column PercentWidth="100">
              <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Issue" Label="Issue" LabelPosition="Left" />
    ...
    
  10. Click Save to save changes to the XML file.

  11. Import the changed Special Task work item type into Team Foundation Server. To do this, at a Visual Studio command prompt, type the following and then press ENTER:

    witimport /f "File Path\specialtask.xml" /t "Team Foundation Server name" /p WITLab

    This imports the specialtask work item type into Team Foundation Server. The following is displayed when the import operation finishes:

    Work item type import complete.

  12. 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 the Work Items node is loaded. Nodes that are still loading display the word working.

  13. Create a new Special Task work item. To do this, right-click the Work Items node, point to Add Work Item, and then click Special Task.

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

    Notice that the Classification group is no longer on the main form. Click the Links and Attachments tab and the Details tab to see the results of the changes that you made.

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

Next Steps

For step-by-step instructions in making additional customizations of a work item type, see Walkthrough: Make Advanced Customizations to a Work Item Type.

See Also

Tasks

Walkthrough: Administer Fields in a Work Item Type

Other Resources

Customizing Work Item Types

Customizing Work Item Types for Team Foundation

Change History

Date

History

Reason

June 2010

Revised references to bold text for content that is not bold.

Customer feedback.