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
- Edit the file TfsVCAnalysisProvider.cs under project Tfs2010VCAdapter or Tfs2008VCAdapter for TFS 2010 and TFS 2008 respectively.
- Find the private method populateChangeGroupMetaData(ChangeGroup group, Changeset changeset).
- 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.
- Rebuild the adapters.
Code extract … see line 4:
1: private static void populateChangeGroupMetaData(ChangeGroup group, Changeset changeset)
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;