Reputation: 1911
I'm working on migrating TFS From On Premises to Azure Devops. We have few custom Work Item Types, and to create dryrun I had to remove them with witadmin. I'm aware of the fact that Change Item Type is only supported I Azure Devops.
Internet recommends creating clones, but due to a number faster way for me is to export as csv and import as different type.
Issue with both approaches is Work Item ID change.
The only way I see is doing change directly in db, and was wondering if anybody tried that before.
The table that looks like it may be the one is called tbl_WorkItemTemplateDefinition. Touching db is last resort.
Did anyone successfully changed work item types and kept same ids?
Upvotes: 0
Views: 177
Reputation: 1911
For future reference:
Changing all custom work item types in [Tfs_DefaultCollection].[dbo].[tbl_WorkItemCoreLatest] to Task works.
This doesn't update custom fields or anything like that, but it lets you keep work items with current id post migration.
This is for XML type, with custom work item types that need to be removed to move from on premise tfs to Azure Devops.
Upvotes: 0
Reputation: 6037
We cannot make sure the Ids of the work items from Azure DevOps Server before migration are the same as those in Azure DevOps Services after migration. As according to the documents below,
About work items and work item types - Azure Boards | Microsoft Learn
When you add and save a work item, the ID is assigned by the system and cannot be changed.
After a work item is created, you can modify all fields except for the ID.
When the work item is saved, the system assigns it a unique ID
For example, we have work items on Azure DevOps Server with the IDs
of #1
#2
#4
#5
(WIT #3
was removed), after migration the work items in Azure DevOps Services Organization could become #1
#2
#3
#4
. This behavior will also be reflected in the ID
column of exported csv files from Azure DevOps Server(before migration) and Azure DevOps Services(after migration).
To avoid work item ID mismatching when bulk updating work item type after migration, you may consider exporting the work items into csv
after migration to Azure DevOps Services, picking up the work items with query and importing the csv
back to update the work items' type. It is suggested using a unique tag/custom work item filed before migration to mark which work items should be updated later. It will be easier for us to filter them out in the query and then export/update the expected work items after migration.
Hope the information helps.
Upvotes: 0