TFS Integration Platform – Configuration: Narrow down the migration or synchronization using Filter Pairs. Question & Answer 9

Another common question is whether you can narrow down the migration or synchronisation using the configuration file. The answer is yes and in this post we will explore a few of the configurations used in the Pioneer Dogfood environment.

Blue Einstein Man Pointing a Stick at a Presentation of a Flying Saucer Clipart IllustrationThe assumption is that you are familiar with the TFS Integration Platform configuration environment … if not, we recommend that you download and review the guidance on first.

Note that the triple dots (…) indicate that we have removed content and that act as a placeholder for irrelevant stuff.

Version Control

The dogfood configuration extract shows that for Version Control, we can define a global snapshot starting point based on a changeset identifier (line 8) or define more granular snapshot starting points in the filter strings (lines 21 and 25). This means that the migration or synchronization will start with the snap shot point and beyond.

The examples below restrict the snapshot starting point to one source (1f87ff05-2e09-49c8-9e9b-0ac6db9dd595), which implies that all changes from the other source will be migrated as shown in the following illustration:

  1. <Session CreationTime="2009-09-11T13:00:21.42-07:00" 
             FriendlyName="Version Control session" 
  2.   <EventSinks />
  3.   <CustomSettings>
  4.     <SettingXml>
  5.       <VCSessionCustomSetting>
  6.         <Settings>
  7.           <Setting SettingKey="SnapshotStartPoint" SettingValue="1F87FF05-2E09-49c8-9E9B-0AC6DB9DD595;809811" />
  8.         </Settings>
  9.       </VCSessionCustomSetting>
  10.     </SettingXml>
  11.     <SettingXmlSchema />
  12.   </CustomSettings>
  13.   <Filters>
  14.     <FilterPair Neglect="false">
  15.       <FilterItem MigrationSourceUniqueId="1f87ff05-2e09-49c8-9e9b-0ac6db9dd595"
                      FilterString="$/Orcas/Lab26vsts" MergeScope="$/Orcas/Lab26vsts" />
  16.       <FilterItem MigrationSourceUniqueId="8c85d8eb-f3b3-4f05-b8dc-c0ab823f1a44"
                      FilterString="$/Orcas/Lab26vsts" MergeScope="$/Orcas/Lab26vsts" />
  17.     </FilterPair>
  18.     …
  19.     <FilterPair Neglect="false">
  20.       <FilterItem MigrationSourceUniqueId="1f87ff05-2e09-49c8-9e9b-0ac6db9dd595"
                      FilterString="$/Orcas/feature/MigrationDogfood" SnapshotStartPoint="1048441"
                      MergeScope="$/Orcas/feature/MigrationDogfood" />
  21.       <FilterItem MigrationSourceUniqueId="8c85d8eb-f3b3-4f05-b8dc-c0ab823f1a44"
                      FilterString="$/Orcas/feature/MigrationDogfood" MergeScope="$/Orcas/feature/MigrationDogfood" />
  22.     </FilterPair>
  23.     <FilterPair Neglect="false">
  24.       <FilterItem MigrationSourceUniqueId="1f87ff05-2e09-49c8-9e9b-0ac6db9dd595" 
                      FilterString="$/Dev10/feature/BranchTools" SnapshotStartPoint="1048441" MergeScope="$/Dev10/feature/BranchTools" />
  25.       <FilterItem MigrationSourceUniqueId="8c85d8eb-f3b3-4f05-b8dc-c0ab823f1a44" 
                      FilterString="$/Dev10/feature/BranchTools" MergeScope="$/Dev10/feature/BranchTools" />
  26.     </FilterPair>
  27.   </Filters>
  28. </Session>

Work Item Tracking

For Work Item Tracking we can define the FilterString as shown, typically using the date and time of work item tracking data to start at a specific point. We could use other filter string, confining our session to specific work item types, however, date and time appears to be the likely candidate for most migrations.

  1. <Filters>
  2.   <FilterPair Neglect="false">
  3.     <FilterItem MigrationSourceUniqueId="BB2BD2C6-92B5-4817-AB51-A087B6532F0D" FilterString="[System.ChangedDate] > '11/30/2009 5:26:31 PM'" />
  4.     <FilterItem MigrationSourceUniqueId="F4741818-F14C-458F-BB20-4BBAC20F95C3" FilterString="[System.ChangedDate] > '11/30/2009 5:26:31 PM'" />
  5.   </FilterPair>
  6. </Filters>

Would you like to know more?

If yes, please keep those questions rolling in … !

Comments (1)

  1. Sarah Brooks says:

    Thankyou!  Exactly what I was looking for!

Skip to main content