Willy's Reflections - Visual Studio ALM Rangers

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

TFS Integration Tools – Why are the timestamps and changeset IDs not moving from source to target? Q&A-37

TFS Integration Tools – Why are the timestamps and changeset IDs not moving from source to target? Q&A-37

  • Comments 2

If we look at the product documentation, in particular the Migration Guidance document, we will notice the following known and documentation restrictions:

In essence the limitations clearly state that:

  • Work item and Changeset IDs are not preserved, but instead re-created by TFS on the target at the time of migration.
  • Work item and Changeset timestamps are not preserved, but instead re-created by TFS on the target at the time of migration.

Works as designed” is probably the frustrating answer for some, whereby these limitations are on our list for future migration features.

What is the EnableInsertReflectedWorkItemId that I noticed in logfiles all about? Q&A-26 defines a mechanism of cross referencing the work item IDs on the source and target systems and the workaround below, received from Pei, is one way of preserving the changeset datetime data as part of the changeset comment:

Adding the original datetime to the comment

  1. Edit the file TfsVCAnalysisProvider.cs under project Tfs2010VCAdapter or Tfs2008VCAdapter for TFS 2010 and TFS 2008 respectively.
  2. Find the private method populateChangeGroupMetaData(ChangeGroup group, Changeset changeset).
  3. Inside the method you will find group.Comment = changeset.Comment, at which point you could get the changeset.CreationDate and append it to the comment.
  4. Rebuild the adapters.

Code extract … see line 4:

   1: private static void populateChangeGroupMetaData(ChangeGroup group, Changeset changeset)
   2: {
   3:     group.Owner = changeset.Owner;
   4:     group.Comment = changeset.Comment;
   5:     group.ChangeTimeUtc = changeset.CreationDate.ToUniversalTime();
   6:     group.Status = ChangeStatus.Delta;
   7:     group.ExecutionOrder = changeset.ChangesetId;
   8: }
Page 1 of 1 (2 items)
Leave a Comment
  • Please add 6 and 7 and type the answer here:
  • Post