XML Elements Added to the Definition for the Work Item Type

You can manually update the definition of a work item type to support synchronization between Visual Studio Team Foundation Server and Project Server. On occasion, a problem can occur when you map a work item type and Team Foundation Server does not add the required XML elements to the type definition. This problem can occur when the work item type does not include a TabGroup element, or changes to the type prohibit the addition of the necessary elements. In these situations, you can, as this topic describes, manually add the necessary elements to the type definition. These elements specify the fields and form controls that support the addition of the Project Server tab to the work item form, as the following illustration shows. For more information, see Project Server Fields Added to Support Data Synchronization.

Project Server Tab default fields

In this topic

  • To Manually Update a Type Definition to Display Project Server Fields

  • Elements to Add to the FIELDS Section

  • Elements to Add to the FORM Section

To Manually Update a Type Definition to Display Project Server Fields

To manually add the Project Server tab to a work item type, perform the following sequence of steps:

  1. Export the type definition.

  2. Add the required FIELD elements to the FIELDS section of the type definition.

  3. Add the Tab elements to the FORM section and within the TabGroup element.

  4. Import the type definition.

For more information, see Export and Import Work Item Types from an Existing Project.

Back to top

Elements to Add to the FIELDS Section

Add the following syntax to the FIELDS section of the type definition. For more information, see Defining Work Item Fields.

<FIELD name="Project Server Submit" refname="Microsoft.Sync.ProjSrv.Submit" type="String">
   <HELPTEXT>Toggle to set whether the work item updates are sent to Project Server</HELPTEXT>
</FIELD>
<FIELD name="Project Server Enterprise Project" refname="Microsoft.Sync.ProjSrv.ProjectName" type="String">
   <HELPTEXT>Name of the enterprise project plan in Project Server</HELPTEXT>
</FIELD>
<FIELD name="Project Server Is Linked" refname="Microsoft.Sync.ProjSrv.IsLinkedToProjSrv" type="String">
   <HELPTEXT>Indicates whether the work item is linked to Project Server</HELPTEXT>
</FIELD>
<FIELD name="Project Server Last Submitted Date" refname="Microsoft.Sync.ProjSrv.LastSubmittedDate" type="DateTime">
   <HELPTEXT>Date of the most recent submission to Project Server</HELPTEXT>
</FIELD>
<FIELD name="Project Server Last Submit Status" refname="Microsoft.Sync.ProjSrv.LastSubmitStatus" type="String">
   <HELPTEXT>Status of success or failure for the most recent submission to Project Server</HELPTEXT>
</FIELD>
<FIELD name="Project Server Last Reviewed Date" refname="Microsoft.Sync.ProjSrv.LastReviewedDate" type="DateTime">
   <HELPTEXT>Date of the most recent approval by the project manager</HELPTEXT>
</FIELD>
<FIELD name="Project Server Last Review Status" refname="Microsoft.Sync.ProjSrv.LastReviewStatus" type="String">
   <HELPTEXT>State of the most recent approval by the project manager</HELPTEXT>
</FIELD>
<FIELD name="Project Server Completed Work" refname="Mirror.Microsoft.VSTS.Scheduling.CompletedWork" type="Double" />
<FIELD name="Project Server Remaining Work" refname="Mirror.Microsoft.VSTS.Scheduling.RemainingWork" type="Double" />
<FIELD name="Project Server Original Estimate" refname="Mirror.Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" />
<FIELD name="Project Server Health" refname="Mirror.Microsoft.VSTS.Common.Health" type="String" />

Back to top

Elements to Add to the FORM Section

To manually add the Project Server tab to a work item type, open the type definition file, find the FORM section, and then add the following syntax to the section. For more information, see Designing the Layout of the Work Item Form.

Note

You can assign any label to the name attribute for each Control element as long as the label is unique within the type definition. You use the name attribute when you want the same field to appear in more than one location on the form. Several fields on the Project Server tab appear elsewhere on the work item form. For more information, see Control XML Element Reference.

<Tab Label="Project Server">
   <Group>
      <Column PercentWidth="30">
         <Group>
            <Column PercentWidth="100">
               <Group Label="Publish">
                  <Column PercentWidth="100">
                     <Control FieldName="Microsoft.Sync.ProjSrv.Submit" name="SubmitName" Type="FieldControl" Label="&amp;Submit to Project Server:" LabelPosition="Left" />
                     <Control FieldName="Microsoft.Sync.ProjSrv.ProjectName" name="ProjectName" Type="FieldControl" Label="Enterprise &amp;Project:" LabelPosition="Left" />
                  </Column>
               </Group>
               <Group Label="Status">
                  <Column PercentWidth="100">
                     <Control FieldName="Microsoft.Sync.ProjSrv.IsLinkedToProjSrv" name="IsLinkedName" Type="FieldControl" Label="&amp;Linked to Project Server:" LabelPosition="Left" ReadOnly="True" />
                     <Control FieldName="Microsoft.Sync.ProjSrv.LastSubmitStatus" name="LastSubmitName" Type="FieldControl" Label="Last S&amp;ubmit Status:" LabelPosition="Left" ReadOnly="True" />
                     <Control FieldName="Microsoft.Sync.ProjSrv.LastSubmittedDate" name="LastSubmittedName" Type="FieldControl" Label="Last Sub&amp;mitted Date:" LabelPosition="Left" ReadOnly="True" />
                     <Control FieldName="Microsoft.Sync.ProjSrv.LastReviewedDate" name="LastReviewedName" Type="FieldControl" Label="Last Approval Date:" LabelPosition="Left" ReadOnly="True" />
                     <Control FieldName="Microsoft.Sync.ProjSrv.LastReviewStatus" name="LastReviewName" Type="FieldControl" Label="Last Approval Status:" LabelPosition="Left" ReadOnly="True" />
                  </Column>
               </Group>
            </Column>
         </Group>
      </Column>
      <Column PercentWidth="70">
         <Group>
            <Column PercentWidth="100">
               <Group Label="Mapped Fields (Project Plan : Work Item)">
                  <Column PercentWidth="50">
                     <Control FieldName="Mirror.Microsoft.VSTS.Scheduling.CompletedWork" name="CompletedWorkMirrorName" Type="FieldControl" Label="Completed Work" LabelPosition="Left" ReadOnly="True" />
                     <Control FieldName="Mirror.Microsoft.VSTS.Scheduling.RemainingWork" name="RemainingWorkMirrorName" Type="FieldControl" Label="Remaining Work" LabelPosition="Left" ReadOnly="True" />
                  </Column>
                  <Column PercentWidth="50">
                     <Control FieldName="Microsoft.VSTS.Scheduling.CompletedWork" name="CompletedWorkName" Type="FieldControl" />
                     <Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" name="RemainingWorkName" Type="FieldControl" />
                  </Column>
               </Group>
               <Group Label="Mapped Fields (Project Plan)">
                  <Column PercentWidth="100">
                     <Control FieldName="Mirror.Microsoft.VSTS.Scheduling.OriginalEstimate" name="OriginalEstimateMirrorName" Type="FieldControl" Label="Original Estimate" LabelPosition="Left" ReadOnly="True" />
                  </Column>
               </Group>
            </Column>
         </Group>
      </Column>
   </Group>
</Tab>

Back to top

See Also

Tasks

Add a Field to or Remove a Field from a Work Item Type

Export and Import Work Item Types from an Existing Project

Concepts

Designing the Layout of the Work Item Form

Other Resources

Customizing the Field Mapping Between Project Server and Team Foundation Server