Code Monkey home page Code Monkey logo

nkdagility / azure-devops-migration-tools Goto Github PK

View Code? Open in Web Editor NEW
475.0 29.0 322.0 43.73 MB

Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.

Home Page: https://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration

License: MIT License

C# 97.93% PowerShell 2.03% Ruby 0.03%
vsts tfs migration bulk-editing azure-devops azure-devops-migrtation microsoft chocolatey azure-devops-services azure-devops-extension

azure-devops-migration-tools's Introduction

Azure DevOps Migration Tools GitHub release Build on VSTS

The Azure DevOps Migration Tools allow you to bulk edit and migrate data between Team Projects on both Microsoft Team Foundation Server (TFS) and Azure DevOps Services. Take a look at the documentation to find out how. This project is published as code on GitHub as well as a Winget package a nkdAgility.AzureDevOpsMigrationTools.

Ask Questions on Github: https://github.com/nkdAgility/azure-devops-migration-tools/discussions

Some Data from the last 30 days (as of 05/03/2024)

Category Metric Notes
Work Items 1m A single Work Item may have many revisions that we need to migrate
Work Item Revisions 23m A single Work Item may have many revisions that we need to migrate
RelatedLinkCount 11m Each work item may have many links or none.
Git Commit Links 1.3m
Attachments 1.2m Total number of attachments migrated
Test Suits 52k total suits migrated
Test Cases Mapped 1.4m Total test cases mapped into Suits
Migration Run Ave 14 minutes Includes dry-runs as well.
Migration Run Total 19bn Seconds Thats 316m hours or 13m days of run time in the last 30 days.
Average Work item Migration Time 22s Work Item (includes all revisions, links, and attachments for the work item)

What can you do with this tool?

  • Migrate Work Items, TestPlans & Suits, Teams, Shared Queries, Pipelines, & Processes from one Team Project to another
  • Migrate Work Items, TestPlans & Suits, Teams, Shared Queries, Pipelines, & Processes from one Organization to another
  • Bulk edit of Work Items across an entire Project.

WARNING: This tool is not designed for a novice. This tool was developed to support the scenarios below, and the edge cases that have been encountered by the 30+ contributors from around the Azure DevOps community. You should be comfortable with the TFS/Azure DevOps object model, as well as debugging code in Visual Studio. Community support is available through GitHub ; Paid support is available through our recommended consultants as well as our contributors and many DevOps consultants around the world.

What versions of Azure DevOps & TFS do you support?

  • Work Item Migration Supports all versions of TFS 2013+ and all versions of Azure DevOps
  • You can move from any Tfs/AzureDevOps source to any Tfs/AzureDevOps target.
  • Process Template migration only supports XML based Projects

Typical Uses of this tool

  • Merge many projects into a single project
  • Split one project into many projects
  • Assistance in changing Process Templates
  • Bulk edit of Work Items
  • Migration of Test Suites & Test Plans
  • new Migration of Builds & Pipelines
  • Migrate from one Language version of TFS / Azure Devops to another (new v9.0)1.34
  • new Migration of Processes

NOTE: If you are able to migrate your entire Collection to Azure DevOps Services you should use Azure DevOps Migration Service from Microsoft. If you have a requirement to change Process Template then you will need to do that before you move to Azure DevOps Services.

Quick Links

Installing and running the tools

These tools are available as a portable application and can be installed in a number of ways, including manually from a zip. For a more detailed getting started guide please see the documentation.

Option 1: Winget

We use winget to host the tools, and you can use the command winget install nkdAgility.AzureDevOpsMigrationTools to install them on Windows 10 and Windows 11.

The tools will be installed to %Localappdata%\Microsoft\WinGet\Packages\nkdAgility.AzureDevOpsMigrationTools_Microsoft.Winget.Source_XXXXXXXXXX and a symbolic link to devopsmigration.exe that lets you run it from anywhere using devopsmigration init.

NOTE: Do not install using an elevated command prompt!

Option 2: Chocolatey

We also deploy to Chocolatey and you can use the command choco install vsts-sync-migrator to install them on Windows Server.

The tools will be installed to C:\Tools\MigrationTools\ which should be added to the path. You can run devopsmigration.exe

Option 3: Manual

You can download the latest release and unzip it to a folder of your choice.

Minimum Permission Requirements

At this time the documented minimum required permissions for running the tools are:

  • Account in both the source and target projects with "Project Collection Administrator" rights
  • PAT with "full access" for both the Source and the Target

Note: I have been informed by the Azure DevOps product team information that ObjectModel API only works with full scoped PATs, so it won't work with any PAT that has specific scopes.

Advanced Unsupported Permission Options

We have seen that the tools may work with less permissions however the following has not been full tested and is not currently supported:

  • Project and Team (Read, write, & manage)
  • Work Items (Read, Write & Manage)
  • Identity (Read & Manage)
  • Security (Manage)

If you do try this out then please let us know how you get on!

Advanced tools

There are additional advanced tooling available on Azure DevOps Automation Tools. These are a collection of Powershell scripts that can be used to;

  • Generate Migration Tools configurations across many projects on many organisations
  • Export Stats on many projects on many organisations
  • Publish Custom fields across many projects on many organisations
  • Output the fields and other data for many projects on many organisations

These tools are designed to help you manage migration of Work Items at scale.

Support

  1. Question & Discussion - The first place to look for usage, configuration, and general help.
  2. Issues on GitHub - If you have identified a bug and have logs then please raise an issue.

Professional Support

You can get free support from the community above and on social media on a best effort basis if folks are available. If you are looking for paid support naked Agility with Martin Hinshelwood & Co has a number of experts, many of whom contribute to this project, that can help. Find out how we can help you with your migration and book a free consultation to discuss how we can make things easier.

We use these tools with our customers, and for fun, to do real world migrations on a daily basis and we can:

  • Consult with your internal folks who need help and guidance in running the tooling.
  • Make changes to the tool to support your needs; all additions are committed to the main repo.
  • Run the migration for you:- you would need to pay for the hours that we would spend baby-sitting the running migrations

Change Log

  • v15.0.0 - Release v15! Query and CommonEnrichersConfig changes
  • v14.4.6 - Release v14! Migrate to winget and change exe name to devopsmigration
  • v13.2.1 - Oct 9, 2023
    • 13.2 - Added ExportUsersForMapping to export a json file with a list of users ready for a field mapping.
    • 13.1 - Update all NuGet packages to the latest version.
    • 13.0 - Update to .net 7.0 with all dependencies. Focus on documentation improvements to support future updates.
  • v12.8.10 - Apr 25, 2023
    • 12.1 - Make embedded images regex lazy
    • 12.1 - Added a stop when there are area or iteration nodes in the source history that are not in the target. This causes missing data. System will now list the areas and iteration that are missing, and then stop. You can decide to add them manually, or add a field mapping.
  • v11.12.23 - Jun 6, 2022
    • v11.11 - Refactored revision manager to have more tests and support limiting the number of revisions. CollapseRevisions has been replaced by setting MaxRevisions to 1 and setting AttachRevisionHistory to true; MaxRevisions sets the maximum number of revisions that will be migrated. "First + Last*N = Max". If this was set to 5 and there were 10 revisions you would get the first 1 (creation) and the latest 4 migrated. This is done after all of the existing revisions are created but before anything newer than that target is removed.
    • v11.10 - Added ability to limit the number of revisions migrated with MaxRevisions on the WorkItemMigration processor. 0 = All, and any other number should migrate the first revision + the latest up to MAX.
    • v11.9 - Dark launch of Process migration by @akanieski
    • v11.9 - Dark launch of Pipelines & Builds migration by @tomfrenzel
    • v11.8 - As part of moving to the new architecture we moved to default newtonsoft type handling with $type properties instead of ObjectType To Migrate rename "ObjectType" to "$type" in your configuration!
    • v11.5 - Added more useful logging levels. Replace "TelemetryEnableTrace": false with "LogLevel": "Verbose" in the config. Verbose will only be logged to the logfile.
    • v11.2.1 - Removed NodeMigrationContext and converted it to an enricher for Work Items. Still needs work, so that it migrates individual nodes, but currently migrates all.
  • v10.2.13 - Sep 27, 2020
    • v10.1 - Changed config design to have only the Name and not FullName of the class. Remove MigrationTools.Core.Configuration.FieldMap. and MigrationTools.Core.Configuration.Processing. from the config leaving only the Name of the class in the ObjectType field.
    • v10.0 - Start of the great refactor over to .NET Core and the REST API as the Object Model has been retired.
  • v9.3.1 - Sep 7, 2020
  • v9.0 - Added support for migration between other language versions of Azure DevOps. Developed for German -> English
  • v8.9.10 -Aug 6, 2020
    • v8.9 - Added 'Collapse Revisions' feature to collapse and attache revisions instead of replaying them
    • v8.8 - 'SkipToFinalRevisedWorkItemType' feature added to handle scenario when changing Work Item Type
    • v8.7 - Support for inline images using a Personal Access Token added to the Source Project
    • v8.6 - Support for fixing links from TFVC Changesets to Git Commits using a mapping file generated from a Git-TFS migration.
    • v8.5 - Attachment Max size and linking work items to git repos between projects.
    • v8.4 - Support for cross-project linking of work items between projects.
    • v8.3 - Support for restarting the migration and syncing at the revision level.
    • v8.2 - Merge Git commit Fixing into Work Item migration (requires repos to be migrated first, can be rerun)
    • v8.0 - Merge of Work Item, Link, & attachment migrators into one.
  • v7.5.74 Sep 18, 2019
  • v6.3.1 Feb 23, 2017

The Technical Details

- Technical Overview
Azure Pipeline Build on VSTS
Coverage Coverage
Maintainability Maintainability Rating
Security Rating Security Rating
Vulnerabilities Vulnerabilities
Release GitHub release

azure-devops-migration-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-devops-migration-tools's Issues

Is it possible to migrate from Agile to Scrum based project

I was going to post this question on the Marketplace, but I was directed here. I'm running TFS 2017 Update 1 and I have an Agile-based team project that I need to migrate to a Scrum process. Does this tool make it possible to migrate to a team project that is using a different process template?

Poor documentation

Very unclear about issues or need for Custom field 'ReflectedWorkItemID' in both VSTS tenancies or it will not work. VSTS does not allow custom fields that are global, so it still does not see the field and errors out with 'The query references a field that does not exist'.

Tool cannot be made to work without more explicit instructions between VSTS tenancies.

Question: Migrating to a state that is not "New"

Hi,

I have been using your tool for some VSTS to VSTS work item migrations and its been great :)

Currently I'm working on my own project to take some exported CSV data from third party systems like Jira to import to VSTS. Using the API I create a create a new workitem and then set the state as "Committed" for example. When i do a validate it fails and the state is reported as invalid because the only valid values are "New".

I was intrigued to see how you achieved the result i was looking for so started searching through the code and found where you set the state in WorkItemMigrateContext.cs Ln186. I looked and it doesn't look like your are doing anything special to set the state to a value that inst a start state. The interesting thing is, i found the State field in the workitems field list and the "isDirty" for the workitem and the field itself is true and the fields status property is "InvalidListValue". When i do a validate however the invalid fields are reported as 0.

However i can get the validate to fail in the sync migrator if i leave the application in a break point for a while and come back to it, like there is some sort of race condition in the API.

Any ideas about setting new workitems to a state like Done or Comitted instead of saving as New and then reopening to save the actual state i want?

Same configuration doesn't work for specific WIT

Hello,

I have a VSTS scrum process, which contains: Task, Feature, Epic, Defect, Enhancement. When running the migration for individual work item types: Feature, Task, Epic all fields I want in VSTS are getting populated with the data from TFS On prem.

When I do: "Migrate all Enhancement work items from TFS to VSTS" strange things happens:

  • Area Path, Iteration Path, Reason, State gets migrated;
  • History gets migrated;
  • Tags are migrated;

BUT - no other field, even with the default value from TFS doesn't get migrated. I've tried to do individual fields with FieldtoFieldMapConfig:

	{
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
      "WorkItemTypeName": "Enhancement",
      "sourceField": "Developer.Description",
      "targetField": "Developer"
        },

And it is not working. AND to bring more confusion, when I change from Enhancement to Feature/Task/Epic - data gets migrated.

I've done everything I could think of except reinstalling the tool.

VSTS to VSTS NodeStructuresMigrationConfig processor error

independent of which source VSTS Project I select, the error is the same when using version 7.5.11
For my Source Project "True Commerce EDI"

Unhandled Exception: Microsoft.TeamFoundation.Server.CommonStructureSubsystemException: TF200014: The following node does not exist: \True Commerce EDI\Area. Verify that the path of the node is correct.
at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 80

the vstsbulkeditor.json
{
"TelemetryEnableTrace": true,
"Source": {
"Collection": "https://highjumpvso.visualstudio.com/",
"Name": "True Commerce EDI"
},
"Target": {
"Collection": "https://truecommercevso.visualstudio.com/",
"Name": "True Commerce EDI"
},
"ReflectedWorkItemIDFieldName": "TfsMigrationTool.ReflectedWorkItemId",
"WorkItemTypeDefinition": {
"Bug": "Bug",
"Epic": "Epic",
"Feature": "Feature",
"Product Backlog Item": "Product Backlog Item",
"Shared Parameter": "Shared Parameter",
"Shared Steps": "Shared Steps",
"Task": "Task",
"Test Case": "Test Case"
},
"Processors": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false
}
]
}

what did I do wrong - I just started to test using the tool?
Thank You

Should have a way to bring across changes

After a source project has been migrated, if there are some changes (like new test suites/plans, new work items, updates on some migrated work items), the tool should be able to sync this change to target project.

WorkItemRevisionReplayMigrationConfig failing when revisions contain area/iteration paths that no longer exist

I'm running a migration for a team project that has been around for years. I already migrated the entire area/iteration trees to the target project. While trying to migrate the work items with history, many of the items are failing to migrate to the target project. I can see they are failing when the work item revision contains an area or iteration path that no longer exists in the source project. Meaning that the items used to be in paths that have since been deleted or renamed.

WorkItemRevisionReplayMigrationContext: System.IterationPath (Iteration Path) | teamproject\RVI\Product\Backlog\2016 R5\ReDesign
WorkItemRevisionReplayMigrationContext: Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save(SaveFlags saveFlags)
at VstsSyncMigrator.Engine.WorkItemRevisionReplayMigrationContext.ReplayRevisions(WorkItem sourceWorkItem, Project destProject, WorkItemStoreContext sourceStore, Int32 current, WorkItemStoreContext targetStore) in d:\a\1\s\src

WorkItemRevisionReplayMigrationContext: ...Replaying 5 revisions of work item 266058
WorkItemRevisionReplayMigrationContext: Dependency: TeamService - NewWorkItem - 10/8/2017 5:49:29 PM - 00:00:00 - True
WorkItemRevisionReplayMigrationContext: ... Building WorkItemRevisionReplayMigrationContext: ...build complete
WorkItemRevisionReplayMigrationContext: FieldMapOnNewWorkItem: 10/8/2017 5:49:29 PM - 00:00:00
WorkItemRevisionReplayMigrationContext: 6144 - Invalid: 266058-Test Case-System.IterationPath
WorkItemRevisionReplayMigrationContext: ...FAILED to Save

I'm not sure how to get around this since the NodeStructuresMigrationConfig processor only migrates the current node structure. Does not account for deleting/renaming area and iteration paths over time. Is there anyway to set up value mappings for area and iteration?

Is there a way to filter the NodeStructuresMigrationConfig

I have several projects that I'm trying to split up. I'd like to migrate a specific set of area and iteration children to a new project. This is fine for work items as I can filter the WorkItemMigrationConfig using the QueryBit and something like a "[System.AreaPath] UNDER" query. However, the NoteStructureMigrationConfig copies everything, regardless of whether it is needed or not. It would be nice to be able to either specify a filter for the NoteStructureMigrationConfig, or to make it aware of the WorkItemMigrationConfig such that it only creates the nodes that are needed for the Work Item Migration.

TF237124: Work Item is not ready to save

I am trying to do a migration between two VSTS accounts. I added the custom field (I think I did that correctly) and source/target sites. It seems to be reading the source data, but giving an error that states the following.

Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF237124: Work Item is not ready to save

Any idea what could be causing this error?

Thank you for your time and assistance!

Error while migrating test plan and suites[EXCEPTION] Object reference not set to an instance of an object.

One test plan got migrated successfully.
While migrating the test suites, we get the following error:
vstssyncmigrator.exe Information: 0 : Query Complete: found 1 work items in 340ms
TestPlansAndSuites: EXISTS TestCase : 76603 - 72604-BVT_Verify all the links present for Service Technician login
TestPlansAndSuites: Processing TestCase : 77515 - 72604-Verify UI of the Appliance section
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https://xxxx.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: https://xxxx.visualstudio.com//xxxx/77515
TfsQueryContext: TfsQueryContext: TeamProject: xxxx
vstssyncmigrator.exe Information: 0 : Query Complete: found 1 work items in 335ms
TestPlansAndSuites: EXISTS TestCase : 77515 - 72604-Verify UI of the App section
TestPlansAndSuites: Processing TestCase : 77602 - 72604-Verify Appliances section on Overview screen for login
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https:/target.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: https://source.visualstudio.com//xxxxx/77602
TfsQueryContext: TfsQueryContext: TeamProject: xxxx
vstssyncmigrator.exe Information: 0 : Query Complete: found 1 work items in 346ms
TestPlansAndSuites: EXISTS TestCase : 77602 - 72604-Verify Appliances section on Overview screen for DSM login
TestPlansAndSuites: SAVED StaticTestSuite : 10267 - FireFox 46
TestPlansAndSuitsMigrationContext: Processing StaticTestSuite : 77757 - 74592-As a User I want to be able to Login to the Heat Pump / Quantum App to enable its usage
TestPlansAndSuitsMigrationContext: Suite Exists
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] Object reference not set to an instance of an object.

Merge the two work item migration contexts

There is a lot of duplicated code now in the master branch.

It would be good to take the revision replay feature (which is a great feature) and apply that to the existing work item migration context. It would probably also need to have a new switch on the config to allow this feature to be turned on/off as there is a significant time factor with the amount of extra calls made.

Can this tool be used to Migrate to a "Sandbox" server to test the results and then again to the "Main" server when ready to migrate?

We are looking at migrating to VSTS from TFS and have a "Sandbox" server setup to test migrations. We then have a live VSTS instance ready when we are ready to go live with the integration.

Since this tool uses the "ReflectedID" value will there be an issue migrating a TFS project to a new server after our initial testing of the migration?

Is there a way to remove the ReflectedID values and restart the migration from scratch?

Work Item IDs

My apologies if this is not the place for this type of question, but while running a test migration I am running into a few issues. We run On-Prem TFS 2017 Update 1.

  1. It gives new IDs when migrating Work Items (Tasks, Support Requests in my case as a test) to a new project. Is there a way to copy WIs and keep their source IDs?

  2. I ran the "WorkItemMigraitonConfig" processor for 'Task' and 'Support Request' and it only migrated approximately 740 WIs when there are over 2500 Tasks/Support Requests. My vstsbuldeditor.json file contents below.

`{
"TelemetryEnableTrace": true,
"Source": {
"Collection": "SOURCE COLLECTION",
"Name": "Source Project"
},
"Target": {
"Collection": "DESTINATION COLLECTION",
"Name": "Destination Project"
},
"ReflectedWorkItemIDFieldName": "TfsMigrationTool.ReflectedWorkItemId",
"WorkItemTypeDefinition": {
"Bug": "Bug",
"Shared Steps": "Shared Steps",
"Task": "Task",
"Test Case": "Test Case",
"User Story": "User Story",
"Feature": "Feature",
"Epic": "Epic",
"Test Plan": "Test Plan",
"Test Suite": "Test Suite",
"Code Review Request": "Code Review Request",
"Code Review Response": "Code Review Response",
"Feedback Request": "Feedback Request",
"Feedback Response": "Feedback Response",
"Shared Parameter": "Shared Parameter",
"Technical Story": "Techical Story",
"Support Request": "Support Request"

},
"Processors": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": false,
"UpdateCreatedBy": false,
"UpdateSoureReflectedId": true,
"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Task', 'Support Request')"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.LinkMigrationConfig",
"Enabled": false,
"QueryBit": "AND ([System.ExternalLinkCount] > 0 OR [System.RelatedLinkCount] > 0)"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementExportMigrationConfig",
"Enabled": false,
"QueryBit": "AND [System.AttachedFileCount] > 0"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementImportMigrationConfig",
"Enabled": false
}
]
}`

Exception The process cannot access the file 'C:\tools\VSTSSyncMigration\export while Attachment migration for Bugs

I am getting the following error continuously for 4 times now which doing a WIT migration. There is one attachment where i get the following error which is really strange. As of now i have removed export and import and run the migration again. Any pointers will help.

vstssyncmigrator.exe Information: 0 : Query Complete: found 1 work items in 233ms
777 of 1227 - Import https+----xxxx.visualstudio.com----teamproject--1380xx#No UI on UI confirmation.mp4 to 119x
Web method running: [https://target.visualstudio.com/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1] (GET)connectionData[connectionData]
Web method response: [https://target.visualstudio.com/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1] (GET)connectionData[connectionData] 918 ms
Web method running: [https://target.visualstudio.com/_apis/wit/attachments?uploadType=chunked] (POST)attachments[wit]
Web method response: [https://target.visualstudio.com/_apis/wit/attachments?uploadType=chunked] (POST)attachments[wit] 183 ms
Web method running: [https://target.visualstudio.com/_apis/wit/attachments/1ff0e575-82c2-4372-9f5f-a8a0a9ab3294?uploadType=chunked] (PUT)1ff0e575-82c2-4372-9f5f-a8a0a9ab3294[wit]
Web method response: [https://target.visualstudio.com/_apis/wit/attachments/1ff0e575-82c2-4372-9f5f-a8a0a9ab3294?uploadType=chunked] (PUT)1ff0e575-82c2-4372-9f5f-a8a0a9ab3294[wit] 2916 ms
Web method running: [https://target.visualstudio.com/_apis/wit/attachments/1ff0e575-82c2-4372-9f5f-a8a0a9ab3294?uploadType=chunked] (PUT)1ff0e575-82c2-4372-9f5f-a8a0a9ab3294[wit]
Web method response: [https://target.visualstudio.com/_apis/wit/attachments/1ff0e575-82c2-4372-9f5f-a8a0a9ab3294?uploadType=chunked] (PUT)1ff0e575-82c2-4372-9f5f-a8a0a9ab3294[wit] 329 ms
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] The process cannot access the file 'C:\tools\VSTSSyncMigration\export\https+----xxx.visualstudio.com----teamproject--1380xx#No UI on UI confirmation.mp4' because it is being used by another process.

TF51005: The query references a field that does not exist (ReflectedWorkItemId)

I tried migrating workitems from one VSTS project to another VSTS project and get errors related to reflected workitemId. On checking for this field at source i could not find it in the column options or query output. Any help here will be really useful.

WorkItemMigrationContext: Migrate 1845 work items?
WorkItemMigrationContext: Found target project as xxxxx
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https://xxxxx.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: https://xxxxx.visualstudio.com//xxxxxx/178572
TfsQueryContext: TfsQueryContext: TeamProject: xxxxx
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is
caused by «[TfsMigrationTool.ReflectedWorkItemId]».

vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is
caused by «[TfsMigrationTool.ReflectedWorkItemId]».

Unhandled Exception: Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references
a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».
at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationCo
ntext\MigrationContextBase.cs:line 80
at VstsSyncMigrator.Engine.MigrationEngine.Run() in d:\a\1\s\src\VstsSyncMigrator.Core\MigrationEngine.cs:line 127
at VstsSyncMigrator.ConsoleApp.Program.RunExecuteAndReturnExitCode(RunOptions opts) in d:\a\1\s\src\VstsSyncMigrator.
Console\Program.cs:line 148
at VstsSyncMigrator.ConsoleApp.Program.<>c.

b__2_1(RunOptions opts) in d:\a\1\s\src\VstsSyncMigrator.Console\Pro
gram.cs:line 88
at CommandLine.ParserResultExtensions.MapResult[T1,T2,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 pars edFunc2, Func2 notParsedFunc)
at VstsSyncMigrator.ConsoleApp.Program.Main(String[] args) in d:\a\1\s\src\VstsSyncMigrator.Console\Program.cs:line 8
6

Transfer identities from TFS to VSTS

Hi everyone,

I have a trouble migrating customized 'user' fields from TFS to VSTS. Here is how field is defined in TFS:

<FIELD name="Tester" refname="Tester.Description" type="String" syncnamechanges="true" reportable="dimension"> <HELPTEXT>Represents the person who tests the work item.</HELPTEXT> <ALLOWEXISTINGVALUE /> <VALIDUSER /> </FIELD>

The way it worked is that TFS was looking at local Active Directory and recognized the colleague. I've noticed sometimes it inserts value to TFS like this: John Doe <DomainName\John.Doe>

Have any of you faced similar issue before? Could this be that in VSTS Azure Directory inserts a different value? Any ideas how I could transfer the names from TFS to VSTS?

Currently after migration I see blank user fields in VSTS, when value is expected.

Thanks,
Ed

Migrating to team areas

I am using v7.5.6 of this tool and TFS v14. It looks like it is a perfect fit for our migration to VSTS. Before migration to VSTS, we would like to migrate some TFS Projects to a single project as TFS Team Areas. When setting PrefixProjectToNodes to “true”, the area and iteration paths are migrated correctly, but the work items do not appear to be migrated to the correct iteration. For example:
Source Iteration: ‘temp\Release 1\Sprint 1’
Desired Iteration: ‘test1\temp\Release 1\Sprint 1’, but was it migrated is ‘temp\Release 1\Sprint 1’
Maybe doing something wrong, both PrefixProjectToNodes for both NodeStructuresMigrationConfig & WorkItemRevisionReplayMigrationConfig is set to True

When migrating from TFS to VSTS, work items fail to save due to errors on System.AreaPath and System.IterationPath

While trying to migrate backlog work items from TFS to VSTS, I can query the work items with no issue, I can visually see the work items being copied in the command line yet they fail to save due to this error:

WorkItemMigrationContext: FieldMapOnNewWorkItem: 9/21/2017 3:46:30 PM - 00:00:00
WorkItemMigrationContext: 238 - Invalid: 1173083-Task-System.AreaPath
WorkItemMigrationContext: 238 - Invalid: 1173083-Task-System.IterationPath
WorkItemMigrationContext: ...FAILED to Save

Has anyone experienced this?
Is there a fix for this?

Import Profiles & Pictures Issue with VSTS

During Importing of profiles and pictures below issue found.

vstssyncmigrator Information: 0 : ProcessingContext Start ImportProfilePictureContext
vstssyncmigrator Warning: 0 :
[EXCEPTION] Access to the path 'C:\Users\martinh\Downloads\mugshots\mugshots' is denied.

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\Users\martinh\Downloads\mugshots\mugshots' is denied.

Looks like issue with hardcoded value in code.

VSTS to VSTS Migration is skipping over all Links and Attachments

As the title says, I am doing a VSTS to VSTS migration. Work items migrate fine however all attachments and links get skipped over stating it is probably missing the reflectiveWorkItemID. This should not be the case as I am using custom templates on both ends with the reflectiveWorkItemID field. Below is my configuration file:

{
"TelemetryEnableTrace": true,
"Source": {
"Collection": "https://smcq.visualstudio.com/",
"Name": "SCM"
},
"Target": {
"Collection": "https://alukose.visualstudio.com/",
"Name": "VSTSMigration2"
},
"ReflectedWorkItemIDFieldName": "ReflectedWorkItemId",
"FieldMaps": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldBlankMapConfig",
"WorkItemTypeName": "",
"targetField": "TFSMigrationTool.ReflectedWorkItemId"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
"WorkItemTypeName": "
",
"sourceField": "System.State",
"targetField": "System.State",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed"
}
},
//test of test suite functionality
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
"WorkItemTypeName": "Test Suite",
"sourceField": "System.State",
"targetField": "System.State",
"valueMapping": {
"In Progress": "In Progress",
"In Planning": "In Planning",
"Completed": "Completed"
}
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
"WorkItemTypeName": "",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoTagMapConfig",
"WorkItemTypeName": "
",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldMergeMapConfig",
"WorkItemTypeName": "",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0}

Acceptance Criteria

{1}",
"doneMatch": "##DONE##"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.RegexFieldMapConfig",
"WorkItemTypeName": "
",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": "$1"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValuetoTagMapConfig",
"WorkItemTypeName": "",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.TreeToTagMapConfig",
"WorkItemTypeName": "
",
"toSkip": 3,
"timeTravel": 1
}
],
"WorkItemTypeDefinition": {
"Bug": "Bug",
"Product Backlog Item": "User Story",
"Requirement": "Requirement",
"Task": "Task",
"Test Case": "Test Case",
"Test Suite": "Test Suite",
"Test Plan": "Test Plan",
"Shared Steps": "Shared Steps",
"Shared Parameter": "Shared Parameter",
"Feature": "Feature"
},

"Processors": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemRevisionReplayMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false,
"UpdateSoureReflectedId": false,
"QueryBit": "AND [ReflectedWorkItemId] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Requirement', 'Task', 'User Story', 'Bug', 'Feature', 'Test Suite', 'Test Plan', 'Test Case')"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.LinkMigrationConfig",
"QueryBit": "AND ([System.ExternalLinkCount] > 0 OR [System.RelatedLinkCount] > 0)",
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementExportMigrationConfig",
"QueryBit": "AND [System.AttachedFileCount] > 0",
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementImportMigrationConfig",
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestVariablesMigrationConfig",
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestConfigurationsMigrationConfig",
"Enabled": true
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestPlansAndSuitsMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"OnlyElementsWithTag": null
}
]
}

and the errors that I am receiving:

LinkMigrationContext: Migrating Links for wiSourceL=5177
LinkMigrationContext: Cannot find twiTargetL matching wiSourceL=5177 probably due to missing ReflectedWorkItemID
LinkMigrationContext: [SKIP] Unable to migrate links where wiSourceL=5177, wiTargetL=NotFound
LinkMigrationContext: Migrating Links for wiSourceL=5176
LinkMigrationContext: Cannot find twiTargetL matching wiSourceL=5176 probably due to missing ReflectedWorkItemID
LinkMigrationContext: [SKIP] Unable to migrate links where wiSourceL=5176, wiTargetL=NotFound
LinkMigrationContext: Migrating Links for wiSourceL=5175
LinkMigrationContext: Cannot find twiTargetL matching wiSourceL=5175 probably due to missing ReflectedWorkItemID
LinkMigrationContext: [SKIP] Unable to migrate links where wiSourceL=5175, wiTargetL=NotFound
LinkMigrationContext: Migrating Links for wiSourceL=5174
LinkMigrationContext: Cannot find twiTargetL matching wiSourceL=5174 probably due to missing ReflectedWorkItemID
LinkMigrationContext: [SKIP] Unable to migrate links where wiSourceL=5174, wiTargetL=NotFound
LinkMigrationContext: Migrating Links for wiSourceL=5173

and:

3 of 34 - Skipping https+----smcq.visualstudio.com----SCM--6653#APR 855 approver aggregation-v2.docx to 0
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https://alukose.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: https://smcq.visualstudio.com//SCM/6654
TfsQueryContext: TfsQueryContext: TeamProject: VSTSMigration2
vstssyncmigrator.exe Information: 0 : Query Complete: found 0 work items in 144ms
2 of 34 - Skipping https+----smcq.visualstudio.com----SCM--6654#APR 855 approver aggregation-v2.docx to 0
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https://alukose.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: https://smcq.visualstudio.com//SCM/6681
TfsQueryContext: TfsQueryContext: TeamProject: VSTSMigration2
vstssyncmigrator.exe Information: 0 : Query Complete: found 0 work items in 142ms
1 of 34 - Skipping https+----smcq.visualstudio.com----SCM--6681#Cat&NonCat_Aramark.png to 0
vstssyncmigrator.exe Information: 0 : Migration Context Complete AttachementImportMigrationContext
vstssyncmigrator.exe Information: 0 : Migration Context Start TestVeriablesMigrationContext

I do not know what could be causing this...
The only possible cause that I can come up with is that the source was first migrated from TFS... Would that be an issue?

Problem with migrating test plans

Hello everyone
I'm trying to migrate workitems from one project to another project and lately I had some problem with tasks not being assigned to proper PBI, BUG etc. After solving this problem I faced another one when migrating test plans. I got this error:
vstssyncmigrator.exe Information: 0 : Migration Context Start TestPlansAndSuitsMigrationContext
TestPlansAndSuites: Plan to copy 1 Plans?
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] Value cannot be null.
Parameter name: value

In attachement you can find configuration file that I'm currently using
vsconfig.txt

Migrating Test Plans and Suites not working properly

Hey there,

I am running into a problem when migrating my test plans and suites including test cases to a new project.

For splitting a big project into smaller ones, I am having the following approach:

  • I add a "Migration" tag to the work items, which I want to migrate in one run (epics, features, user stories, bugs, tasks, test cases, test suites, test plans)
  • I then adapt the settings for the tool to only include items with the tag in the migration.

However, when I run the tool with the configuration below, the migration is not working properly.
The work items on their own and the links and attachments are ported fine, but the test plans and suites not. There, I get the full test plan from the old project, although I only marked a certain sub-tree with the tags.

How can I limit the test suites and test cases, I want to migrate?

Best regards,
Harald

This is my current setting:

	"Processors": [
	{
	  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
	  "Enabled": true,
	  "PrefixProjectToNodes": false
    },
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
		"Enabled": true,
		"PrefixProjectToNodes": false,
		"UpdateCreatedDate": true,
		"UpdateCreatedBy": true,
		"UpdateSoureReflectedId": false,
		"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [System.Tags] Contains 'Migration'"
	},	
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.LinkMigrationConfig",
		"Enabled": true,
		"QueryBit": "AND ([System.ExternalLinkCount] > 0 OR [System.RelatedLinkCount] > 0) AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [System.Tags] Contains 'Migration'"
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementExportMigrationConfig",
		"Enabled": true,
		"QueryBit": "AND [System.AttachedFileCount] > 0 AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [System.Tags] Contains 'Migration'" 
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementImportMigrationConfig",
		"Enabled": true
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestVeriablesMigrationConfig",
		"Enabled": true
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestConfigurationsMigrationConfig",
		"Enabled": true
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestPlansAndSuitsMigrationConfig",
		"Enabled": true,
		"PrefixProjectToNodes": false,
		"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [System.Tags] Contains 'Migration'"
	},
	{
		"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.FixGitCommitLinksConfig",
		"Enabled": true
	}]

Error TF26194: The value for the field 'Closed Date' cannot be changed

Hello,

The VSTS Sync Migration tool is generally working for me after some experimenting. It migrates the majority of items as directed. Overall, it's a pretty slick tool. Regardless, if I don't include the query bit AND [Microsoft.VSTS.Common.ClosedDate] = '' the program ends on the error "Error TF26194: The value for the field 'Closed Date' cannot be changed" when it hits the "Tasks." It appears to migrate other items (e.g., Product Backlog Items and Bugs) that have a Closed Date, but no tasks. Is there a way to work around this message and migrate everything, even items with Closed Dates? Also, I am attempting to migrate from one VSTS project to another VSTS project.

Thank you!

TestPlansAndSuitsMigrationConfig

I'm doing a migration of all work items (PBI, Epic etc including Test Suite and Test Plan) in a TFS Project based on the Scrum Template.
Environment is TFS 2017 Update 1 On Premise.
Migration from one TFS Project to another TFS Project within the same collection.
The work items in the new TFS Project are prepared with the field ReflectedWorkItemId (refname TfsMigrationTool.ReflectedWorkItemId)

The migration works great, until TestPlans&Suites. Please view the attached json migration config file and the log file (zipped):
VSTSSyncMigration.zip

The log file contains some Swedish. Translation:
"Värde får inte vara null" is Swedish for "Value must not be null"
Parameternamn is Swedish for "Parameter Name"

What am I doing wrong?

Errors migrating Test Plan with automated tests

I am trying to migrate a Test Plan that has automated tests, and am getting errors on targetPlan.Save().

  • first error was "[EXCEPTION] Build vstfs:///Build/Build/122369 cannot be found."
    ([Info]: SessionID: 31feca6d-7f27-47b2-9cdf-7e07b60dfb86)

I cleared the BuildUri to work around that problem and then got :
[EXCEPTION] Test settings 180 not found.
([Info]: SessionID: 52caf148-b951-4507-8cf8-9952522e8c96)
"180" is the value of the AutomatedTestSettingsId of my Test Plan ... so I guess that we should migrate Test Settings before the plan. Has this already been implemented ?

Anyone already succeeded in migrating Test Plans with automated tests ?

Issues with Migration Of Work Items - Attachments and Test Plan history

We are trying to run the tool to migrate the work items from one VSTS account to another. Workitems are getting migrated, related links do get migrated but we see two issues:

  1. The attachments present in the WIT are coming but appear with a prefix +http+.......... and the content is corrupted, contains an html which has the error message
    Microsoft Internet Explorer's Enhanced Security Configuration is currently enabled on your environment. This enhanced level of security prevents our web integration experiences from displaying or performing correctly. To continue with your operation please disable this configuration or contact your administrator

  2. The test plans and test suites get migrated but the test run and history of previous runs doesnt get migrated. The test plans don't have associated test cases.

Help in this regard pls.....

Feature request: WorkItemRevisionReplayContext

Hey there!

I would like to not only migrate the current state of a work-item to the new project, but I would like to port over the whole revision history, to get the history in the new system as well, including the state graph, which would be of very much value for me.

Having a look at the code of the Work Item Migration Context, it should not be a big deal to have the following approach in place:

  • instead of just taking a "snapshot" of the latest revision of the item, recreate it in revision 0 state from the original system
  • then replay all revisions from the original work item on the target item

You would already have quite much things for this in place. Instead of just simply copying the values from the current work item, just walk through the workItem.Revisions collection and use the Fields property there, to replay the changes on the item on the target system.

Would you see this as being feasible after all?

As mentioned: keeping the state + revision history and thus the state graph intact in the target system would be of immense value for me!

Cheers,
Harald

VstsSyncMigrator fails if file size exceeds the supported file upload size

Stack trace output:

Unhandled Exception: Microsoft.TeamFoundation.WorkItemTracking.Client.FileAttach mentException: TF237082: The file you are trying to upload (DEV Test Data.zip) exceeds the supported file upload size (29 MB(s)). Instead of uploading the file, add the file to version control or to the team project web site, and then link the file to the work item. at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in D:\vsts\vsts-syn c-migration-6.0.1\vsts-sync-migration-6.0.1\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 86 at VstsSyncMigrator.Engine.MigrationEngine.Run() in D:\vsts\vsts-sync-migration-6.0.1\vsts-sync-migration-6.0.1\src\VstsSyncMigrator.Core\MigrationEngine.cs: line 117 at VstsSyncMigrator.ConsoleApp.Program.RunExecuteAndReturnExitCode(RunOptions opts) in D:\vsts\vsts-sync-migration-6.0.1\vsts-sync-migration-6.0.1\src\VstsSy ncMigrator.Console\Program.cs:line 127 at VstsSyncMigrator.ConsoleApp.Program.<>c.

b__2_1(RunOptions opts) in D:\vsts\vsts-sync-migration-6.0.1\vsts-sync-migration-6.0.1\src\VstsSyncMigrator. Console\Program.cs:line 65 at CommandLine.ParserResultExtensions.MapResult[T1,T2,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 notParsedFunc) at VstsSyncMigrator.ConsoleApp.Program.Main(String[] args) in D:\vsts\vsts-sync-migration-6.0.1\vsts-sync-migration-6.0.1\src\VstsSyncMigrator.Console\Program.cs:line 63

Migration of Attachments doesn't work for VSTS

During my migration-project from VSTS->VSTS, I faced the problem, that attachments are not migrated succesfully. I enabled the "Attachment-Processors" and according to my understanding of the log file, all attachments have been detected and moved correctly. Unfourtunateley in the target-projects all attachments have 14KByte and are unreadable. This happened with all files, independ from the file format.

I added the configuration for my productive-migration and a log from a test-migration. Please let me know, if I should provide more information.

Config.json.txt
example.log.txt

Copy specific parts of collection (with history) to another collection

I'm try to do something like this:

{
    "TelemetryEnableTrace": true,
    "Source": {
        "Collection": "http://10.174.198.25:8080/tfs/Collection1/",
        "Name": "Dev/Src/App/AddPdfBookmark"
    },
    "Target": {
        "Collection": "http://10.174.198.25:8080/tfs/Collection2/",
        "Name": "Dev/Src/App/AddPdfBookmark"
    },
    
    ...
}

I just want to copy the source code from one collection to another and maintain the full history. I'm not sure which Processor I should use nor am I sure if your code even does what I'm trying to do.

Any tips?

Thanks,
Darren

VSTS to VSTS Migration of work items issue

When I try to test the migration from one project to another project within the same collection, I get the Validation exception. The config file is as follows. The name of my customized process is 'Customize Process" and the reference is shown as "Customizeprocess" in VSTS.

  "TelemetryEnableTrace": true,
  "Source": {
    "Collection": "https://****.visualstudio.com/",
    "Name": "ABCD"
  },
  "Target": {
    "Collection": "https://****.visualstudio.com/",
    "Name": "Migration"
  },
  "ReflectedWorkItemIDFieldName": "Customizeprocess.ReflectedWorkItemId",
  "FieldMaps": [
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.MultiValueConditionalMapConfig",
      "WorkItemTypeName": "*",
      "sourceFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      },
      "targetFieldsAndValues": {
        "Field1": "Value1",
        "Field2": "Value2"
      }
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldBlankMapConfig",
      "WorkItemTypeName": "*",
      "targetField": "Customizeprocess.ReflectedWorkItemId"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "targetField": "System.State",
      "valueMapping": {
        "Approved": "New",
        "New": "New",
        "Committed": "Active",
        "In Progress": "Active",
        "To Do": "New",
        "Done": "Closed"
      }
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.Common.BacklogPriority",
      "targetField": "Microsoft.VSTS.Common.StackRank"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "formatExpression": "ScrumState:{0}"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldMergeMapConfig",
      "WorkItemTypeName": "*",
      "sourceField1": "System.Description",
      "sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
      "targetField": "System.Description",
      "formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
      "doneMatch": "##DONE##"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.RegexFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "COMPANY.PRODUCT.Release",
      "targetField": "COMPANY.DEVISION.MinorReleaseVersion",
      "pattern": "PRODUCT \\d{4}.(\\d{1})",
      "replacement": "$1"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValuetoTagMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "Microsoft.VSTS.CMMI.Blocked",
      "pattern": "Yes",
      "formatExpression": "{0}"
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.TreeToTagMapConfig",
      "WorkItemTypeName": "*",
      "toSkip": 3,
      "timeTravel": 1
    }
  ],
  "WorkItemTypeDefinition": {
    "Bug": "Bug",
    "Product Backlog Item": "Product Backlog Item"
  },
  "Processors": [
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
      "PrefixProjectToNodes": true,
      "UpdateCreatedDate": true,
      "UpdateCreatedBy": true,
      "UpdateSoureReflectedId": true,
      "QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND  [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
      "Enabled": false
    },
    {
      "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemRevisionReplayMigrationConfig",
      "Enabled": true,
      "PrefixProjectToNodes": true,
      "UpdateSoureReflectedId": true,
      "QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND  [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')"
    }

When I run it, the following error is thrown:
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».

Unhandled Exception: Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».
at VstsSyncMigrator.Engine.MigrationContextBase.Execute() in d:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\MigrationContextBase.cs:line 80
at VstsSyncMigrator.Engine.MigrationEngine.Run() in d:\a\1\s\src\VstsSyncMigrator.Core\MigrationEngine.cs:line 127
at VstsSyncMigrator.ConsoleApp.Program.RunExecuteAndReturnExitCode(RunOptions opts) in d:\a\1\s\src\VstsSyncMigrator.Console\Program.cs:line 156
at VstsSyncMigrator.ConsoleApp.Program.<>c.

b__4_1(RunOptions opts) in d:\a\1\s\src\VstsSyncMigrator.Console\Program.cs:line 94
at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 parsedFunc3, Func`2 notParsedFunc)
at VstsSyncMigrator.ConsoleApp.Program.Main(String[] args) in d:\a\1\s\src\VstsSyncMigrator.Console\Program.cs:line 92

What am I doing wrong ? Thanks in advance.

FieldMergeMap: Null exception when doneMatch is not defined

When using the FieldMergeMap, if doneMatch is left unspecified or null, an exception is written to the output... This makes it very difficult to scan lengthy logs for legitimate exceptions.

Recommendaton 1:
Set a default value in the configuration and use the configuration purely, instead of a static value OR the configuration... e.g.:

public string doneMatch { get; set; } = "##DONE##";

along with

if (target.Fields[config.targetField].Value.ToString().Contains(config.doneMatch))

Recommendation 2:

Add a null check:

if (target.Fields[config.targetField].Value.ToString().Contains("##DONE##") || (config.doneMatch != null && target.Fields[config.targetField].Value.ToString().Contains(config.doneMatch))

Issue with migrating Test Plan and Test Suites in TFS-VSTS migration

I was in process of migrating work items from TFS to VSTS account. While running the test plan and suite migration context, an exception was thown that "Work item type could not be found or has been moved".
I didn't enlist "Test Plan" and "Test Suite" in the WorkItemTypeDefinition section of the vstsbulkeditor.json, on basis that they are implicitly done by the test plan and suite migration context. Are these types to be enlisted too in the WorkItemTypeDefinition section or this is caused by some other issue?

VSTS sync migration tool found less items than actually exist

Hello all,

I just started to use VSTS sync migrator, and noticed that:

a) I don't know how to use it
b) if I understand the manual, there should be something wrong with my configuration

In TFS on-prem there are 8 'Defects', this is how we call and name Bugs, but when I try to migrate it to VSTS it finds only 4.

I also get message in CMD:
"Runnin Field Map: MultiValueConditionalMap
[SKIPPED] Not all source and target fields exist"

In TFS on-prem team project there are more WITs and Work Items, but I only want to transfer Defects. Can I do that?

My .json file looks like this:

{

"TelemetryEnableTrace": true,

"Source": {
"Collection": "SOURCE URL/COLLECTION",
"Name": "TEAM PROJECT"
},

"Target": {
"Collection": "TARGET VSTS ACCOUNT",
"Name": "Team Project"
},

"ReflectedWorkItemIDFieldName": "VSTS process name.ReflectedWorkItemId",

"FieldMaps": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.MultiValueConditionalMapConfig",
"WorkItemTypeName": "",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldBlankMapConfig",
"WorkItemTypeName": "
",
"targetField": "VSTS process name.ReflectedWorkItemId"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValueMapConfig",
"WorkItemTypeName": "",
"sourceField": "System.State",
"targetField": "System.State",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed"
}
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoFieldMapConfig",
"WorkItemTypeName": "
",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldtoTagMapConfig",
"WorkItemTypeName": "",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldMergeMapConfig",
"WorkItemTypeName": "
",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0}

Acceptance Criteria

{1}",
"doneMatch": "##DONE##"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.RegexFieldMapConfig",
"WorkItemTypeName": "",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": "$1"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.FieldValuetoTagMapConfig",
"WorkItemTypeName": "
",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.FieldMap.TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"WorkItemTypeDefinition": {
"Defect": "Defect",
"Enhancement": "Enhancement",
},

"Processors": [
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
"PrefixProjectToNodes": false,
"UpdateCreatedDate": false,
"UpdateCreatedBy": false,
"UpdateSoureReflectedId": false,
"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
"Enabled": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemRevisionReplayMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false,
"UpdateSoureReflectedId": false,
"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Defect')"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemUpdateConfig",
"WhatIf": false,
"QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
"Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
  "PrefixProjectToNodes": false,
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.LinkMigrationConfig",
  "QueryBit": "AND ([System.ExternalLinkCount] > 0 OR [System.RelatedLinkCount] > 0)",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemPostProcessingConfig",
  "QueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' ",
  "WorkItemIDs": [ 1, 2, 3 ],
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemDeleteConfig",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementExportMigrationConfig",
  "QueryBit": "AND [System.AttachedFileCount] > 0",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementImportMigrationConfig",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemQueryMigrationConfig",
  "PrefixProjectToNodes": false,
  "SharedFolderName": "Shared Queries",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestVariablesMigrationConfig",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestConfigurationsMigrationConfig",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestPlansAndSuitsMigrationConfig",
  "PrefixProjectToNodes": true,
  "Enabled": false,
  "OnlyElementsWithTag": null
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestRunsMigrationConfig",
  "Status": "Experimental",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.ImportProfilePictureConfig",
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.ExportProfilePictureFromADConfig",
  "Domain": null,
  "Username": null,
  "Password": null,
  "PictureEmpIDFormat": null,
  "Enabled": false
},

{
  "ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.FixGitCommitLinksConfig",
  "TargetRepository": "DemoProjt",
  "Enabled": false
}

]
}

Problem with Migrating Query Based Test Suites

Hello,

I'm trying to migrate some test plans. Everything else in the source project has already been migrated to the target (all user stories and test cases with revision history, area/iteration node structure, and attachments). The test plans I am trying to migrate have lots of query based test suites. The migration fails on creating them as a query based suite:

TestPlansAndSuitsMigrationContext: Processing DynamicTestSuite : 344840 - UC3 - Get FFP Account
TestPlansAndSuites: Saving DynamicTestSuite : 0 - UC3 - Get FFP Account
TestPlansAndSuites: FAILED DynamicTestSuite : 0 - UC3 - Get FFP Account | TF51011: The specified area path does not exist. The error is caused by «'ResAuto\IVR\IIDS\FFP'».

So while the path does exist in the target, that error message has the source team project name in the log as the root node, not the target team project name. I have already made sure PrefixProjectToNodes was set to false on every applicable processor I ran.

The migration ends up creating the suite as a static suite, but then doesn't add any of the test cases. The resulting Test Suite name for the error above is "BROKEN: UC3 - Get FFP Account | TF51011: The specified area path does not exist. The error is caused by «'ResAuto\IVR\IIDS\FFP'»."

Does this tool support migrating query based test suites? If so, any idea what I might be doing wrong?

Thank you,
Patrick

The query references a field that does not exist ?

Trying to solve this issue for past few days.... Do you think migrator is accessing a field from VSTS that is now proprietary.. Here is the log

stssyncmigrator.exe Information: 0 : Migration Context Complete TeamMigrationContext
vstssyncmigrator.exe Information: 0 : Migration Context Start WorkItemMigrationContext
TfsQueryContext: TfsQueryContext: TeamProjectCollection: http://--.com/tfs/TalentApp
TfsQueryContext: TfsQueryContext: TeamProject: TalentApp
vstssyncmigrator.exe Information: 0 : Query Complete: found 886 work items in 946ms
WorkItemMigrationContext: Migrate 886 work items?
WorkItemMigrationContext: Found target project as TalentApp
TfsQueryContext: TfsQueryContext: TeamProjectCollection: https://txxx.visualstudio.com/
TfsQueryContext: TfsQueryContext: idToFind: http://xxx.talentapp.com/tfs/TalentApp/TalentApp/918
TfsQueryContext: TfsQueryContext: TeamProject: TalentApp
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».
vstssyncmigrator.exe Warning: 0 : [EXCEPTION] TF51005: The query references a field that does not exist. The error is caused by «[TfsMigrationTool.ReflectedWorkItemId]».

VSTS to VSTS work item migration says not supported

I'm trying to migrate work items (VSTS to VSTS). The WorkITemRevisionReplayMigrationContext says the following:

WorkItemRevisionReplayMigrationContext: 1 - Migrating: 5802 - User Story
WorkItemRevisionReplayMigrationContext: ...Replaying 8 revisions of work item 5802
WorkItemRevisionReplayMigrationContext: ...not supported
WorkItemRevisionReplayMigrationContext: Average time of 0:571 seconds per work item and 0 hours 0 minutes 0:000 seconds estimated to completion

Any ideas?

Shared Steps are not being updated in the Test Case

I am trying to migrate my test cases. I broke my .json file apart and migrated over just my shared steps. I verified that those migrations moved over all of the shared steps from my source project (TFS2012). I then tried to migrate my test cases (also using WorkItemMigrationConfig). It does not seem to be updating the link to the shared steps in the Test Case steps.

Is this done in another processor? If so, which one? Below is the processor section of my .json file. For debugging puproses, I am only running one process at a time and with the WorkItemMigrationConfig process, I am executing that one work item at a time as well:

"Processors":
[
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.NodeStructuresMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.WorkItemMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"UpdateSoureReflectedId": false,
"QueryBit": "AND [System.WorkItemType] IN ('Test Case')"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.LinkMigrationConfig",
"Enabled": false,
"QueryBit": "AND ([System.ExternalLinkCount] > 0 OR [System.RelatedLinkCount] > 0)"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementExportMigrationConfig",
"Enabled": false,
"QueryBit": "AND [System.AttachedFileCount] > 0"
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.AttachementImportMigrationConfig",
"Enabled": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestVariablesMigrationConfig",
"Enabled": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestConfigurationsMigrationConfig",
"Enabled": false
},
{
"ObjectType": "VstsSyncMigrator.Engine.Configuration.Processing.TestPlansAndSuitsMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false
}
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.