How-to migrate Backlog Items from TFS to DevOps

This page is based on the work our ninja team did to migrate 2 projects from TFS to DevOps. Please feel free to make edits, suggestions and improvements. (Also feel free to talk to Tibo (Unlicensed)/John Sewchand (Unlicensed) if any questions).

Please see the note below as this has significant limitations.  The ideal time to migrate to DevOps is likely at the beginning of a sprint when the content within your backlog items is minimal and the state of the majority of items is "New".  It is not an easy task to perform if you have the need to migrate items that have already been worked on (eg. old sprints).  Also note that the process for moving your code from TFS to DevOps is documented quite nicely here.

Instructions

NOTE:  With this process you lose Iteration Path, Area Path, Assigned To, State, Reason, Effort, attachments, inline pictures and some other data.  This will have to be updated manually if desired.  Also, for Tasks, the Description and Comments are not uploaded, and for Bugs, the Repro Steps are not uploaded.

  1. Export from TFS into Excel (https://docs.microsoft.com/en-us/azure/devops/report/excel/create-status-and-trend-excel-reports?view=azure-devops-2019)
    1. In TFS, create a query of the items you would like exported. Here is the query we used for CORAL.

    2. In Visual Studio, open Team Explorer, Work Items and navigate to the query created in step 1a. Right-click and select "Open in Microsoft Excel". Save it. Done.

  2. Import to DevOps (https://docs.microsoft.com/en-us/azure/devops/boards/backlogs/office/bulk-add-modify-work-items-excel?view=azure-devops)
    1. Open a blank Excel sheet, hit the TEAM menu, then New List.
    2. Add the server/organization: eg. https://dev.azure.com/TCMarineSafetyOrg and click Connect.
    3. Enter user credentials (eg. john.sewchand@034gc.onmicrosoft.com).
    4. Select Input List.
    5. Hit the TEAM menu, Add Tree Level, select Parent-Child, then Convert. (Microsoft documentation about Tree Level and example)
    6. From the exported sheet, copy the values from the Work Item Type column into the new sheet.
    7. State and Reason automatically populate.
    8. Copy the Title 1 and Title 2 from the export sheet.
    9. Copy the remaining header values from the export sheet to the new one.
    10. Delete the duplicated Assigned To and Reason columns.
    11. Copy the data from the additional columns to the new sheet.
    12. Save the sheet and hit Publish.
      1. It may complain about Area Path, Iteration Path if they don't exist in Devops. Changethose to \.
  3. Open TFS and DevOps side by side, and manually move over any desired Attachements, Linked items, etc. that aren't covered by steps 1 and 2.  This part is tedious!


If you're not seeing your Backlog Items in your team's Devops board, it means you likely have to update the "Area Path" and "Iteration" of the items you uploaded.  As an example, when we migrated the CORAL application we created an Area Path called \CORAL and gave our team access to that Area Path.  We updated all of the Backlog Items for CORAL to have this Area Path (this can be done in bulk).  We also created an Iteration called Ninja Turtles (named after our team).  Each of the Backlog Items was given this value for Iteration (again, in bulk) and our team was given access to this Iteration.  Once this was done, the items showed up in our team's backlog.