Move Azure DevOps Work Items From One Organization To Another

Introduction

If you need to move all of your Azure DevOps Work Items from one of your organizations to another, then no worries, you came to the right place. At the end of this article, I am sure that you will be able to achieve this. In my previous article, I had shown you how you can move your repository from one organization to another, if you have not read it, consider reading it.

Move Work items to another DevOps

As I mentioned in my previous post I had already set up a sample project in my source DevOps organization and another in my destination DevOps organization. Then I created a sample user and gave access to both projects.

Check the DevOps project process

Now before we start we need to make sure that both of the projects follow the same Process in the DevOps.

DevOps Process

DevOps Process Check

Change the Project process

If the process of the two projects is different, then you will end up with many issues in the publishing steps, thus changing it to one is very important. To change, you need to have certain permissions as mentioned in this post. Once you have enough permission, go to your organization settings and click on the Process menu under Boards.

Organization Process

Organization Process Settings

Now you should be able to select the projects which are assigned to each process, clicking the project number will redirect you to the list.

DevOps Project

DevOps Project and Process

Now click on the three dots you see near the project name and then click on the Change button.

Change the DevOps

Change the DevOps Process

Just select the process and click Save. Also, make sure that you have enabled all the Backlog Navigation Levels.

Backlog Navigation

Backlog Navigation Levels

You are done!

Create a Query to get the work items

Now let’s say that I have the below sample work items, and I need to create a query to get all these work items.

Work Items

Work Items in Source Organization

Click on the Queries menu on the left side and then click on the +New Query button. In the Type of Query button, click on the “Tree of work items” if you need the tree structure in the work items otherwise just click on “Flat list of work items”

Tree of Work item

Tree of Work Items

Change the type of tree dropdown value to Parent/Child, and then run the query.

Parent-Child

Parent-Child Query DevOps

Just save the query, we will be using that very soon.

Export Query

DevOps Export Query

Install the Azure DevOps office integration tool

To download the tool, please visit here. Once you install the same, you should see a Team tab in your Excel, yes, we are going to play with Excel now.

Get data from Azure DevOps in Excel

Click on the Team button and then New List, you will see an option to select the server, or if you don’t have any you need to add it by clicking the Servers button.

Connect Azure

Connect Azure DevOps from Excel

Now add both Source and Destination DevOps servers.

Add DevOps

Add DevOps Servers in Excel

Now it is time to connect our Source DevOps server.

DevOps Server

Connect DevOps Server

Click on the New List under the Team tab, which will give you the option to select the query that we created before, just select the same and press OK.

DevOps Query

Select DevOps Query

This will fetch all the work items from your source DevOps.

 Items in Excel

DevOps Work Items in Excel

Click on the Team button, select any columns in the Excel sheet, and click on the Choose Column. Select All Work Items Types in the dropdown and then move all the columns to the right side.

 Columns

Show all the Columns

This will show all the columns in the Excel sheet with data. Now it is time to publish these work items to our destination DevOps.

Publish work items to destination DevOps

To do this, open another Excel then click on the New List button under the Team Tab. Now select the destination DevOps and connect. In the next Pop-up, select the Input List option.

Input List

Input List

You will see some columns in the Excel sheet now. Click the Team button and then Add Tree Level, this will make sure that we have the tree structure in our DEstination DevOps too.

PLEASE MAKE SURE THAT YOU ARE ADDING AS MANY LEVELS YOU HAVE IN YOUR SOURCE DEVOPS EXCEL SHEET. IN OUR CASE, IT IS 4.

Tree Level

Now click on the Choose Columns and add all the columns as we did with the Source Excel Sheet. Please make sure that both Excel sheet columns are in the same order. You can order the fields in the order you wish. Once both Excel sheets have the same order, select the data from the source and then select the first data cell in the destination Excel sheet, and then press Enter. This is how the data looks like in the destination Excel.

Pasted Data

Posted Date

Please note that the above screenshot doesn’t include all the columns. In your case, it should be there in the Excel sheet.

Now select any column in the Excel sheet and then click on the Publish button under the Team tab. By chance, if you are getting any errors you may have to manually review the same and assign the right values.

Publishing Errors

Work Item Publishing Errors

If everything goes well, you should see all your work items in your destination Azure DevOps.

New Work Items

New Work Items

Conclusion

Thanks a lot for reading this article. I hope now you have learned about it.

  • How to use queries in Azure DevOps
  • How to use Azure DevOps integration tools for Office
  • How to change the project Process
  • How to move the work items from one DevOps to another

If you have learned anything else from this article, please let me know in the comment section.

Follow me

If you like this article, consider following me:

Your turn What do you think?

Thanks a lot for reading. Did I miss anything that you may think is needed in this article? Did you find this post useful? Kindly do not forget to share your feedback.