nkdAgility / azure-devops-migration-tools

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Work Items, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
https://nkdagility.com/learn/azure-devops-migration-tools/
GNU Affero General Public License v3.0
498 stars 330 forks source link

Migrate 15 Task work items out of 17 with state done #564

Closed AsitJena closed 4 years ago

AsitJena commented 4 years ago

For questions on usage please use https://stackoverflow.com/questions/tagged/azure-devops-migration-tools and tag with azure-devops-migration-tools

Hello Team,

I have used the version of 10.2 and facing one of the issue following

Issue is that out of 17 Task work items 15 are coming and 2 Task are not migrated but in that place two Product backlog item is creating with no title and state is new****

See the log file below. migration.log

Please suggest / advice as am in between the migration.

Thank you! -Asit

MrHinsh commented 4 years ago

It looks like the issue is with the code that handles WorkItem type changes.

 //If the work item already exists and its type has changed, update its type. Done this way because there doesn't appear to be a way to do this through the store.
                    if (!skipToFinalRevisedWorkItemType && targetWorkItem.Type.Name != finalDestType)

                    {
                        Debug.WriteLine($"Work Item type change! '{targetWorkItem.Title}': From {targetWorkItem.Type.Name} to {destType}");
                        var typePatch = new JsonPatchOperation()
                        {
                            Operation = Microsoft.VisualStudio.Services.WebApi.Patch.Operation.Add,
                            Path = "/fields/System.WorkItemType",
                            Value = destType
                        };
                        var datePatch = new JsonPatchOperation()
                        {
                            Operation = Microsoft.VisualStudio.Services.WebApi.Patch.Operation.Add,
                            Path = "/fields/System.ChangedDate",
                            Value = currentRevisionWorkItem.Revisions[revision.Index].Fields["System.ChangedDate"].Value
                        };

                        var patchDoc = new JsonPatchDocument();
                        patchDoc.Add(typePatch);
                        patchDoc.Add(datePatch);
                        _witClient.UpdateWorkItemAsync(patchDoc, targetWorkItem.Id, bypassRules: true).Wait();
                    }
MrHinsh commented 4 years ago

What version of TFS if the Target?

MrHinsh commented 4 years ago

If you are moving from an environment that supports rename to one that does not then you will need to migrate only the tip of work items that have been changed. There is no good or easy way to identify them.

AsitJena commented 4 years ago

Hello Martin,

I am doing azure to azure migration.

Thank you!

Asit Jena | T +91 1724267973 | M +91 9041266677

From: Martin Hinshelwood nkdAgility.com notifications@github.com Sent: Tuesday, September 22, 2020 6:15 PM To: nkdAgility/azure-devops-migration-tools azure-devops-migration-tools@noreply.github.com Cc: Jena, Asit [AUTOSOL/MOHA] Asit.Jena@Emerson.com; Author author@noreply.github.com Subject: [EXTERNAL] Re: [nkdAgility/azure-devops-migration-tools] Migrate 15 Task work items out of 17 with state done (#564)

What version of TFS if the Target?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nkdAgility_azure-2Ddevops-2Dmigration-2Dtools_issues_564-23issuecomment-2D696696907&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=sI0rOLBm9HM4z_ihP8kZc-XBohKH9LaVZyPrU1eifR8&m=rtXCWybhIvLLENcPTdTjIpljLEPHuhQN8W6z1kSVC1o&s=F4ExqRewZzjFMG-MTRV4bvTT-gWueWLMOFRZBKW5Yrk&e=, or unsubscribe [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKHAYNB2D57DHSYPMRG3TVLSHCL6PANCNFSM4RUUVBUQ&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=sI0rOLBm9HM4z_ihP8kZc-XBohKH9LaVZyPrU1eifR8&m=rtXCWybhIvLLENcPTdTjIpljLEPHuhQN8W6z1kSVC1o&s=zc2Mq65tlMozsZfAupyQbE2WcJEf3G2MkOhoHaIvjvE&e=.

MrHinsh commented 4 years ago

If you are having this issue then @wesmacdonald suggests to use "SkipToFinalRevisedWorkItemType" to force the tool to create every revision with the final type rather than try to change it mid work item.

AsitJena commented 4 years ago

Hello Martin,

Thank you, it works for me as per my requirement.

But I was ran this option under the version of 8.9

Thank you! Asit Jena | T +91 1724267973 | M +91 9041266677

From: Martin Hinshelwood nkdAgility.com notifications@github.com Sent: Wednesday, September 30, 2020 3:08 AM To: nkdAgility/azure-devops-migration-tools azure-devops-migration-tools@noreply.github.com Cc: Jena, Asit [AUTOSOL/MOHA] Asit.Jena@Emerson.com; Author author@noreply.github.com Subject: [EXTERNAL] Re: [nkdAgility/azure-devops-migration-tools] Migrate 15 Task work items out of 17 with state done (#564)

If you are having this issue then @wesmacdonald [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_wesmacdonald&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=sI0rOLBm9HM4z_ihP8kZc-XBohKH9LaVZyPrU1eifR8&m=9KrfS_WpwCmhXy9DvPve6T0ez5Y_GKN0BZUC3vTCNrw&s=s3gkq1xplYqhd3xQQ1GN4N4ajz7D9I5OCfmP6nTBsOs&e= suggests to use "SkipToFinalRevisedWorkItemType" to force the tool to create every revision with the final type rather than try to change it mid work item.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nkdAgility_azure-2Ddevops-2Dmigration-2Dtools_issues_564-23issuecomment-2D701004877&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=sI0rOLBm9HM4z_ihP8kZc-XBohKH9LaVZyPrU1eifR8&m=9KrfS_WpwCmhXy9DvPve6T0ez5Y_GKN0BZUC3vTCNrw&s=-AZr3_TL-YebrAY7LJZfQOXf_wUPTRmAGME7uKqei3U&e=, or unsubscribe [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKHAYNFSI6TA4OXIEV6LUMTSIJHT5ANCNFSM4RUUVBUQ&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=sI0rOLBm9HM4z_ihP8kZc-XBohKH9LaVZyPrU1eifR8&m=9KrfS_WpwCmhXy9DvPve6T0ez5Y_GKN0BZUC3vTCNrw&s=RXS0pl4I4VvG_Emq47rj-x8dVmHa26rJSltSUS57t_k&e=.