microsoft / vsts-work-item-migrator

WiMigrator is a command line tool for migrating work items between VSTS/TFS projects
MIT License
148 stars 69 forks source link

Workitem links not properly migrated #28

Closed simondel closed 6 years ago

simondel commented 6 years ago

Expected behavior:

Links between workitems in the source project are restored in the target project image

(Image is from source project)

Actual behavior:

Links between workitems in the source project are placed as hyperlinks in the target project image (Image is from target project)

The work item on the target project does contain a hyperlink to the ID of the work item in the source project: image

Summary:

I just migrated our workitems from one VSTS project to another one (within one account), but the links were not properly migrated. If I look at the backlog on the source project, I see that most stories and bugs have children:

image

If I look at the backlog on the target project, I see the workitems, but the children are not there: image

simondel commented 6 years ago

This is the config I used:

{
  "source-connection": {
    "account": "https://MYACCOUNT.visualstudio.com/",
    "project": "SourceProject",
    "access-token": "ei5..................ta",
    "use-integrated-auth": "false"
  },
  "target-connection": {
    "account": "https://MYACCOUNT.visualstudio.com/",
    "project": "TargetProject",
    "access-token": "ei5..................ta",
    "use-integrated-auth": "false"
  },
  "query": "Shared Queries/All Items",
  "skip-existing": false,
  "move-history": true,
  "move-history-limit": 200,
  "move-git-links": true,
  "move-attachments": true,
  // the tag to stamp on the work items on the source project
  // once the migration is complete.
  "source-post-move-tag": "6F078B6C-2A96-453B-A7C3-EACE6E63BB97",
  // the tag to stamp on the work items on the target project
  // once the migration is complete.
  "target-post-move-tag": "6F078B6C-2A96-453B-A7C3-EACE6E63BB97",
  // when true, will skip the work item if the area path does not exist in the target account
  // when false, will migrate the work item and set the area path to the project name when the area
  // path does not exist on the target account.
  "skip-work-items-with-missing-area-path": true,
  // when true, will skip the work item if the iteration path does not exist in the target account
  // when false, will migrate the work item and set the iteration path to the project name when the iteration
  // path does not exist on the target account.
  "skip-work-items-with-missing-iteration-path": true,
  // when the area path doesn't exist on the target project, the migrator will use this area path
  // instead of defaulting to the root.
  // note: if skip-work-items-with-missing-area-path is true, this setting is ignored.
  "default-area-path": "contoso-project\\missing area path",
  // when the iteration path doesn't exist on the target project, the migrator will use this iteration path
  // instead of defaulting to the root.
  // note: if skip-work-items-with-missing-iteration-path is true, this setting is ignored.
  "default-iteration-path": "contoso-project\\missing iteration path",
  // if the account has any identities with emojis, it's possible migration
  // will fail if the identity with an emoji has not been added to the account.
  // This setting will remove the display portion of the identity to ensure
  // migration will succeed.
  "clear-identity-display-names": false,
  // when true, will add any identities that are referenced by work items to the account,
  // adding them to the Licensed Users group.  This applies only to VSTS, not TFS.
  // when false, if any identity that is referenced by the work item does not exist it will
  // be created as a non-identity value which can cause issues for query and in the case
  // of special characters in the name the work item will fail to be migrated.
  "ensure-identities": false,
  // minimum log level that will be logged to the file.
  // if omitted, defaults to information.
  // acceptable values from lowest to highest log level: trace, debug, information, warning, error, critical.
  "log-level-for-file": "information"
}
simondel commented 6 years ago

Fixed by adding move-links. I thought the default was true so I removed if from my config.