Flashheart
Flashheart

Reputation: 21

I tried to migrate a work item in Azure Devops that has a link to a branch in a git repository but the link did not get migrated over

I'm currently learning how to migrate projects from one collection to another and I'm using the VSTS-Sync Migrator tool to do the job.

I have this one work item that has a link to a branch in a repo (it is not a link to a git commit) and after running the migrator tool/script the same work item at the destination project contains everything but the git branch link.

-> I made sure to migrate the code prior to migrating the work items.

-> I am able to manually attach the same link in the migrated work item.

-> PAT token has full access

I've attached pictures of the issues below, the last time I asked a question on StackOverflow the pictures did not make it on so I will also add a description of each picture.

IMG 1: This is the warning message from the migration script. It says:

Cannot determine repository type from external link: vstfs:///Git/Ref/.....some link....

IMG 2: This is the migrated work item and under "Development" it shows an exclamation mark with the following message:

Branch not found or no permission to access it.

IMG 3: This is the work item at source.

Warning message from the script

Migrated Work item

Source Work item with link

Upvotes: 1

Views: 1477

Answers (2)

When you migrate the work item, each of the Git commit links are mapped to the new Git repo as per the mapping that you have specified in the config file.

The reason that you get the error is that the Branch link is migrated as is and has not been mapped to the new Repo. I think this is an oversight in the migration tools and you should submit a pull request to https://github.com/nkdAgility/azure-devops-migration-tools that includes the fix.

Check: https://nkdagility.github.io/azure-devops-migration-tools/

Upvotes: 2

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30313

The error message says the branch cannot be found. You can check if the name of the repo in target collection is the same with source collection. Or you can try defining the repo mapping (GitRepoMapping) in the configuration.json.

There are tools provided by Microsoft that you can use to migrate your projects.

For migrating from TFS to Azure DevOps, please check the tutorial from the microsoft documentation. Please check here for supported version of azure devops

You can also check about the migration tool vsts-work-item-migrator

Upvotes: -1

Related Questions