Willy's Reflections - Visual Studio ALM Rangers

| Willy-Peter Schaub | Visual Studio ALM Rangers | In search of IT simplicity, quality and tranquility |

Why are my WIT Links not migrating? Q&A-43 Part II

Why are my WIT Links not migrating? Q&A-43 Part II

Rate This
  • Comments 6

This blog post is a continuation from the post Why are my WIT Links not migrating? Q&A-43 and covers another scenario reported by our support engineers, where links are not migrating automatically (as expected).

Generally, when migrating between Team Projects based on a process template such as MSF for Agile Software Development, MSF for CMMI Process Improvement or Microsoft Visual Studio Scrum, or similar process template the migration of links just works.

In the following scenario, however, where we migrate from a Team Project based on the Conchango Scrum process template to a Team Project based on the MSF for Agile Software Development we encounter yet another scenario where the red question mark appears in the diagram (as below) to indicate that a link has gone missing.

… why?

The reason for this anomaly is that there are custom link types in the Conchango Scrum Process Template, which the TFS Integration Tools are unaware of and therefore need additional configuration settings. You can get the Linktype out of the wit definition and put that on the appropriate source side, in this case Left.

The configuration extract example is as follows:

<LinkTypeMappings>
        <LinkTypeMapping LeftMigrationSourceUniqueId="…leftsourceguid…" 
                         LeftLinkType="Scrum.ImplementedBy"
                         RightMigrationSourceUniqueId="…rightsourceguid…" />
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem" 
</LinkTypeMappings>

Rerunning the migration using a session configuration with the link type mapping, as above, results in a happier migration results which include the link between the work items as shown below.

Another example, pulled from one of the ClearQuest configuration files from the readiness package, shows the same concept when migrating from Clear Quest to a Team project based on the MSF for CMMI Process Improvement process template:

<LinkTypeMappings>
        <LinkTypeMapping LeftMigrationSourceUniqueId="…leftsourceguid…"
                         LeftLinkType="ClearQuestAdapter.LinkType.Duplicate"
                         RightMigrationSourceUniqueId="…rightsourceguid…"
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>
        <!-- Request to Task(s) -->
        <LinkTypeMapping LeftMigrationSourceUniqueId=""…leftsourceguid…"
                         LeftLinkType="ClearQuestAdapter.LinkType.ReferenceListFieldRecordLink.request.Tasks"
                         RightMigrationSourceUniqueId="…rightsourceguid…"
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>
        <!-- Request to Requirement(s) -->
        <LinkTypeMapping LeftMigrationSourceUniqueId=""…leftsourceguid…"
                         LeftLinkType="ClearQuestAdapter.LinkType.ReferenceListFieldRecordLink.request.Requirements_List"
                         RightMigrationSourceUniqueId="…rightsourceguid…"
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>
        <!-- Request to StakeHolderRequest(s) -->
        <LinkTypeMapping LeftMigrationSourceUniqueId=""…leftsourceguid…"
                         LeftLinkType="ClearQuestAdapter.LinkType.ReferenceListFieldRecordLink.request.StakeholderRequests"
                         RightMigrationSourceUniqueId="…rightsourceguid…"
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>
        <!-- Task(s) to Request -->
        <LinkTypeMapping LeftMigrationSourceUniqueId=""…leftsourceguid…"
                         LeftLinkType="ClearQuestAdapter.LinkType.ReferenceListFieldRecordLink.Task.Requests"
                         RightMigrationSourceUniqueId="…rightsourceguid…"
                         RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>
</LinkTypeMappings>

The configuration guide that is included with the tooling will be updated accordingly in the next release.

  • Good Stuff!  I made a custom tool to convert all the links to the right kind of links, but it looks like I needn't have done that.

    I want to do this with my next migration.  But I am a bit confused.  I see "..leftsourceguid..." and "...rightsourceguid...".  What are those?  Where do I get them? Or are they any old GUID?

  • The ...leftsourceguid... and ...rightsourceguid... are placeholders for the GUIDs which represent the migration source. For example if you open the default ClearQuest.xml configuration template that ships with the tooling, you can scroll to the bottom to see an example of the LinkTypeMappings and a reference back to the Source configuration GUID, i.e.       <MigrationSource InternalUniqueId="BB2BD2C6-92B5-4817-AB51-A087B6532F0D" FriendlyName="CQ source" ... which is at the beginning of the configuration file.

    Does this make sense?

  • This should allow a bit more fain-grained control..  We are moving from a system where everything is related to everything.  I'd like to specify that the related link between PBI -> SBI should become "Implemented By" while the related relationship between PBI -> bug remains related..  etc..  Is this possible?

  • Thank you Willy!!! Where should I place <LinkTypeMappings>? Should I place <LinkTypeMappings> below  <ValueMaps />?

    <CustomSettings>

             <SettingXml>

               <WITSessionCustomSetting>

                 <Settings />

                 <WorkItemTypes>

                   <!-- Map only Bug to Bug

                   <WorkItemType LeftWorkItemTypeName="Bug" RightWorkItemTypeName="Bug" fieldMap="@@ALL@@" />

                   -->

                 </WorkItemTypes>

                 <FieldMaps>

                 </FieldMaps>

                 <ValueMaps />

  • I found answer to earlier question: It's under Linking section: For e.g.

    <Linking>

         <CustomSettings />

         <LinkTypeMappings>

           <LinkTypeMapping LeftMigrationSourceUniqueId="d7916626-92d6-42e4-afb8-55c838b3aa8e"

                            LeftLinkType="Scrum.ImplementedBy"

                            RightMigrationSourceUniqueId="3cbaccd2-9967-4f7f-af32-9c2c9d2981dd"

                            RightLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"/>

         </LinkTypeMappings>

       </Linking>

  • This helps a lot but I can't seem to find the right "LinkType".

    I think I figured out my left source type (Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem) but when I use "System.LinkTypes.Hierarchy" on the right side, I seem to get the opposite relation I want to get. (User Stories get a first "Parent" task and then raise an error because they only can have one parent).

    I must be very close to the solution but what would be the right type to map "childs" instead of "parents".

    <LinkTypeMapping LeftMigrationSourceUniqueId="205c034a-47a3-405d-af6c-09ecd26c5d8f"

                            LeftLinkType="Microsoft.TeamFoundation.Migration.TFS.LinkType.WorkItemToWorkItem"

    RightMigrationSourceUniqueId="fae8917a-b373-48c8-863f-d9880aa749f1"

                            RightLinkType="System.LinkTypes.Hierarchy"  />

    </LinkTypeMappings>

    Any advice would be really appreciated!

    Thanks a lot,

    Justin

Page 1 of 1 (6 items)
Leave a Comment
  • Please add 7 and 1 and type the answer here:
  • Post