nkdAgility/azure-devops-migration-tools

Revisions assigning users incorrectly

ansvcholayi opened this issue · 1 comments

So here in one of the revisions , the Assigned to value is Charles Moss , but suddenly when it saves that revision it is getting saved as Mathieu Mazoyer , the person whose PAT token is used for migration. And i cant seem to understand why that is happening , it should be like that right ?

[15:56:24 INF] [v14.4.6] Migrating link for 6184 of type RelatedLink
[15:56:24 DBG] [v14.4.6] RelatedLink is of ArtifactLinkType='Related Workitem':LinkTypeEnd='System.LinkTypes.Hierarchy-Reverse' on WorkItemId s:6184 t:73181
[15:56:24 DBG] [v14.4.6] TfsWorkItemMigrationClient::GetWorkItem(6168)
[15:56:24 DBG] [v14.4.6] WorkItemQuery: ===========GetWorkItems=============
[15:56:24 DBG] [v14.4.6] WorkItemQuery: TeamProjectCollection: https://tfstest.ansys.com:8443/tfs/ANSYS_OPTICS_2/
[15:56:24 DBG] [v14.4.6] WorkItemQuery: Query: SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject]='OpticStudio' AND [Custom.ReflectedWorkItemId] = 'https://dev.azure.com/ZemaxLLC/OpticStudio/_workitems/edit/6168'
[15:56:24 DBG] [v14.4.6] WorkItemQuery: Parameters: {"TeamProject": "OpticStudio", "idToFind": "https://dev.azure.com/ZemaxLLC/OpticStudio/_workitems/edit/6168"}
[15:56:24 DBG] [v14.4.6] WorkItemQuery: TeamProject: OpticStudio
[15:56:24 DBG] [v14.4.6] WorkItemQuery: idToFind: https://dev.azure.com/ZemaxLLC/OpticStudio/_workitems/edit/6168
[15:56:24 DBG] [v14.4.6] Query sent
[15:56:25 INF] [v14.4.6] 1 Work items received, verifying
[15:56:25 INF] [v14.4.6] Loading 1 Work Items
[15:56:26 DBG] [v14.4.6] 1 Work Items loaded
[15:56:26 DBG] [v14.4.6] GetReflectedWorkItemId: START
[15:56:26 DBG] [v14.4.6] GetReflectedWorkItemId: END - Has ReflectedWorkItemIdField and has value
[15:56:26 DBG] [v14.4.6] GetReflectedWorkItemId: START
[15:56:26 DBG] [v14.4.6] GetReflectedWorkItemId: END - Has ReflectedWorkItemIdField and has value
[15:56:26 INF] [v14.4.6]   [CREATE-START] Adding Link of type System.LinkTypes.Hierarchy-Reverse where wiSourceL=6184, wiSourceR=6168, wiTargetL=73181, wiTargetR=68555
[15:56:26 INF] [v14.4.6]   [CREATE-SUCCESS] Adding Link of type System.LinkTypes.Hierarchy-Reverse where wiSourceL=6184, wiSourceR=6168, wiTargetL=73181, wiTargetR=68555
[15:56:26 INF] [v14.4.6] GitRepositoryEnricher: Enriching 73181 To fix Git Repo Links
[15:56:27 DBG] [v14.4.6] GitRepositoryEnricher: Saving 73181
[15:56:27 DBG] [v14.4.6] TfsExtensions::SaveToAzureDevOps
[15:56:27 DBG] [v14.4.6] TfsExtensions::SaveToAzureDevOps: ChangedBy: Migration, AuthorisedBy: Mathieu Mazoyer
[15:56:27 DBG] [v14.4.6] TfsExtensions::SaveToAzureDevOps
[15:56:27 DBG] [v14.4.6] TfsExtensions::SaveToAzureDevOps: ChangedBy: Migration, AuthorisedBy: Mathieu Mazoyer
[15:56:27 INF] [v14.4.6] [                Task][Complete:     1/1][sid:  6184|Rev:  2][tid:  null | ...Saved as 73181
[15:56:27 INF] [v14.4.6] [                Task][Complete:     1/1][sid:  6184|Rev:  2][tid:  null | Average time of 3.665 per work item and 0 hours 0 minutes 3.665 seconds estimated to completion
[15:56:27 INF] [v14.4.6] DONE in 00:00:09.1489838

This is expected behaviour.

All AuthorisedBy: Mathieu Mazoyer are the user who did the migration, and the additional saves at the end are not from the source but cleanup entries to add the links so they are made by ChangedBy: Migration.

[15:56:27 DBG] [v14.4.6] TfsExtensions::SaveToAzureDevOps: ChangedBy: Migration, AuthorisedBy: Mathieu Mazoyer

Migration is as follows:

  1. All Revisions <-- connected to the user that made the change
  2. All Links <-- attributed to "migration"
  3. All Attachments <-- attributed to "migration"