azure-devops-migration-tools icon indicating copy to clipboard operation
azure-devops-migration-tools copied to clipboard

Cross project linking of work items not working

Open neelsrules opened this issue 2 years ago • 8 comments

This is a reopening of issue - https://github.com/nkdAgility/azure-devops-migration-tools/issues/354

Cross project linking in work items isn't working:

This functionality isn't working. I am on v12.0.14.0 and confirm that the both source workitem, source link item, target work item and target link item exist. I created these work items one project at a time as suggested. However, I get this error for every single cross project reference I have:

Migrating link for 1282 of type RelatedLink [14:01:55 INF] [SKIP] Unable to migrate link where Link of type System.LinkTypes.Related-Forward where wiSourceL=1282, wiSourceR=1498, wiTargetL=1438, wiTargetR=1498 as target WI has not been migrated

wiTargetR should have been 903, instead I see the same ID as the wiSourceR.

I have more than 500 of these links that aren't migrated. Any help is greatly appreciated.

neelsrules avatar Sep 14 '22 21:09 neelsrules

Quick question. SourceLeftSide is equal to workitem that is currently in process to migrate in Team Project A SourceRightSide is that in the same team project as SourceLeftSide or in a different place

And in the case of same team project, has SourceRightSide been migrated in this run? Do you have any other error logs written out in the run?

You will get alot of those warnings, as that is just the fact of life during this migration. Both sides of the workitems have the link so the problem fixes itself,as long as you are migrating both items with this tool Sample: WorkItem1 runs first, and points to WorkItem2, since 2 does not yet exist the link cannot be added and you get that warning written out WorkItem2 runs, has the link to WorkItem1, and migrates the link as well and now we have the link shown on both sides

ovebastiansen avatar Sep 14 '22 21:09 ovebastiansen

My Source and targets are AzureDevOps -> different tenants & organizations & projects - The tenant & organization names are different, but the project name is the same in both source & target.

I have run the migration tool multiple times on the different projects to make sure that the work items are created - fixing the errors at every step. Now that the # of work items in each of the projects match - I am re-running the migration tool to make sure the cross project links will be created.

The is the complete log for the work item migration: As you can see below one relatedlink (within the same project) migrated properly. However, the other relatedlink pointing to a different project fails:

[14:01:42 INF] Loading 1 Work Items [14:01:49 INF] [ Requirement][Complete: 58/94][sid: 1282|Rev: 6][tid: null | Work Item has 6 revisions and revision migration is set to True [14:01:49 INF] Found 6 revisions to migrate on Work item:1282 [14:01:49 INF] Found 0 revisions to migrate on Work item:1282 [14:01:49 INF] [ Requirement][Complete: 58/94][sid: 1282|Rev: 6][tid: null | Links 2 | LinkMigrator:True [14:01:49 INF] Migrating link for 1282 of type RelatedLink [14:01:50 INF] 1 Work items received, verifying [14:01:50 INF] Loading 1 Work Items [14:01:55 INF] [SKIP] Already Exists a Link of type System.LinkTypes.Hierarchy-Reverse where wiSourceL=1282, wiSourceR=1323, wiTargetL=1438, wiTargetR=1352 [14:01:55 INF] Migrating link for 1282 of type RelatedLink [14:01:55 INF] [SKIP] Unable to migrate link where Link of type System.LinkTypes.Related-Forward where wiSourceL=1282, wiSourceR=1498, wiTargetL=1438, wiTargetR=1498 as target WI has not been migrated [14:01:55 INF] GitRepositoryEnricher: Enriching 1438 To fix Git Repo Links [14:01:55 INF] [ Requirement][Complete: 58/94][sid: 1282|Rev: 6][tid: null | Skipping as work item exists and no revisions to sync detected [14:01:55 INF] [ Requirement][Complete: 58/94][sid: 1282|Rev: 6][tid: null | Average time of 7.110 per work item and 0 hours 4 minutes 22.777 seconds estimated to completion [14:01:55 INF] 1 Work items received, verifying

neelsrules avatar Sep 14 '22 23:09 neelsrules

Project A = Source Project B = Target And now you have a workitem in project A that is related to a worktitem in Project C What is the expected related for the migrated workitem. Should it still point to the workitem in Project C or have you also migrated the workitem in Project C to Project D? As far as I understood from the prev issue you linked to, it seems that only the last option is possible, if you enable CrossProject Linking in the config, but cannot guarantee that it still works since I haven't tested it

ovebastiansen avatar Sep 15 '22 06:09 ovebastiansen

CrossProject linking is enabled in my config.

Project A = Source (Tenant 1, Organization X) Project A = Target (Tenant 2, Organization Y)

  • I gave Project A as both Source and target because the project names are the same. They are in different tenants & organization names are also different.

Project B exists in both source tenant & target tenant. I am expecting a link to be created in Target Project A to a work item in Target Project B just like a link existed in Source Project A for Source Project B.

Hope this explanation helps:

Source: Tenant 1 -> Organization X -> Url would be something like: https://dev.azure.com/OrgX This has the following Projects: A, B, C

Target: Tenant 2 -> Organization Y -> Url would be something like https://dev.azure.com/OrgY This has the same project names and work items have been migrated from source: A, B, C

So, in my case -> source project name is the same as target project name (but in different tenants). Is that the cause for link migration to fail? Can I just rename my target project name to something else & attempt link migration (& revert the name change after the links are migrated as well)?

neelsrules avatar Sep 15 '22 11:09 neelsrules

@ovebastiansen Any guidance you can provide?

neelsrules avatar Sep 17 '22 21:09 neelsrules

Is the workitem in project B also migrated with this tool? Since it looks up TargetProjectB Workitems based on the reflectedworkitemfield

ovebastiansen avatar Sep 19 '22 10:09 ovebastiansen

Yes, they are all migrated using the tool.

neelsrules avatar Sep 19 '22 17:09 neelsrules

I found a potential bug that might explain this, will see if I can get a bugfix out the door soon

ovebastiansen avatar Sep 22 '22 08:09 ovebastiansen

can you test it out with latest version and report back result?

ovebastiansen avatar Sep 23 '22 11:09 ovebastiansen

Thank you very much @ovebastiansen. Your fix worked great!

neelsrules avatar Sep 27 '22 23:09 neelsrules