bcochofel
bcochofel

Reputation: 11

Wrong "ReflectedWorkItemIDFieldName" while migrating Azure DevOps Work Items

I am testing the azure-devops-migration-tools and have create a project using https://azuredevopsdemogenerator.azurewebsites.net/ (Parts Unlimited). I have generated the configuration.json and changed the Source and Target so I can test a migration, but I'm getting errors while migrating Work Items.

[15:14:41 ERR]  Error running query
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «ReflectedWorkItemId».

I've tried different options on the "ReflectedWorkItemIDFieldName" field, Scrum, Basic, Agile, Custom, empty but am still unable to migrate the work items.

How can I get the value to put on this field for the specific project?

Thanks, Bruno

Upvotes: 1

Views: 1395

Answers (3)

mikesneider
mikesneider

Reputation: 802

To make the migration in the "ReflectedWorkItemIDFieldName" you must do:

 "Organization Settings" -> Process -> Select the process where you project are (Basic, Scrum, Agil, or CMMI).  

then click on the 3 dots and create a new Inherited process. Then with the inherited process, you are able to create a new field for each work item type. The name that you type (could be "IronMan") that name will be in your configuration file.

Upvotes: 0

Kevin Van Flandern
Kevin Van Flandern

Reputation: 11

Quick Solution: Most ADO instances use the prefix 'custom' for new fields. Try "Custom.ReflectedWorkItemId" in your configuration.json to see if that resolves the problem.

More details: It's hard to tell without an actual configuration.JSON file to review. One possible problem is that you need to use the actual and full internal 'Name' of the ReflectedWorkItemID field. This doesn't show in ADO, or the Process Template when created. The recommendation is that you create a query referencing your custom field, and export the WIQL file (query file). Once you export the WIQL file, you can then open the file and see the full syntax of the custom field.

Exporting Queries: If you don't know how to do this, it can be done with VisualStudio. If you don't know how to do that, you can install this extension. It's a handy WIQL import/Export and editor. Install, and your ADO Queries with have an Edit in WIQL Editor option. Create a query that exposes your 'ReflectedWorkItemID' as a column, then edit that query in the WIQL editor and see the full names of the Reflected Work Items ID Feild. https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor

SELECT
    [System.Id],
    [System.WorkItemType],
    [System.Title],
    [System.AssignedTo],
    [System.ChangedBy],
    [Custom.ReflectedWorkItemId]
FROM workitems
WHERE ...

Upvotes: 1

bcochofel
bcochofel

Reputation: 11

I found a possible solution. I have created a custom process, change the process from the projects to this new one and add a new field. This is the field I'm using on the configuration.json and now I'm able to migrate work items

Upvotes: 0

Related Questions