TestPlan migrator uses TARGET work item ID to locate SOURCE Work Item #1770
Replies: 2 comments 8 replies
-
This is 100% the correct behaviour.
This line gets the WorkItem from the Source so that we can validate that the target item is the correct item.
We then use the source work item to create the reflected work item id string. This is a string that uniquely identifies the Source work item and is stored inside the Target Work item so that we can validate this.
We then get the value of the
If these two values are not the same, then we do not have the correct item. |
Beta Was this translation helpful? Give feedback.
-
Thank you for responding so quickly. I still believe the behavior is incorrect. This line finds the target test Plan and sets it to the variable of ITestPlan testPlan = (from p in tmc.Project.TestPlans.Query("Select * From TestPlan") where p.Name == name select p).SingleOrDefault(); This line uses the ID of the target work item to find an item in source, thereby returning the wrong work item. var sourceWI = Engine.Source.WorkItems.GetWorkItem(testPlan.Id.ToString()); Observe how in my case the id of 12422 finds a Test Plan in the target, but a Bug work item in the source |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Relevant log output
the second fetch of the target plan here
https://github.com/nkdAgility/azure-devops-migration-tools/blob/2c5de98077fbf8ca85cc10bd3121bad97a35f310/src/VstsSyncMigrator.Core/Execution/MigrationContext/TestPlansAndSuitesMigrationContext.cs#L915C1-L916C1
Isn't working, which results in the error you see logged above.
It looks like the
sourceWI
inIs using
testPlan.Id
of the TARGET TestPlan it just found instead of the Source Test plan, Resulting in a mismatch of workItem Id's.This also applies to re-running the tool,.
FindTestPlan
can't find the test plan and a duplicate test plan gets created.Debug in Visual Studio
Beta Was this translation helpful? Give feedback.
All reactions