0

I have an old instance of TFS 2015 that was installed with the DefaultCollection for the instance. We are moving to a 2017 TFS instance now that has a Named Instance so we can't just import the old TFS into the new because there is not DefaultInstance and there won't be one (according the to the SysOps that run the server). So I connected to the 2015 instance and ran a query to pull down all the work items and history into an excel database. However, when I try and connect to the 2017 instance to Publish I keep getting the error:

The reconnect operation failed because the team project collection you selected does not host the team that the document references. Verify that you selected the correct team project collection and try again.

So how can I pull the DefaultCollection from the old 2015 server and publish it to the new 2017 TFS server under a different Collection Name?

Thanks.

john
  • 1,273
  • 3
  • 16
  • 41
  • You can rename a team project collection. – Daniel Mann Dec 03 '18 at 19:30
  • I cannot change the team project collection name. I have no control over the 2017 TFS servers. They have been set up by the sysops group with the name already. I have tried to get a rename and that is not an option. Thanks. – john Dec 03 '18 at 22:14
  • 1
    You can change the project collection name on the 2015 instance, prior to migrating it to 2017. – Daniel Mann Dec 04 '18 at 15:20

1 Answers1

0

I finally figured out how this is done so I am posting my steps in case someone else needs to know.

  1. Created the queries in the old version of TFS (in my case 2015). In my case I created a "Tree of work items" query type, and set the Work Item Type value to Feature. And Set the State to any.
  2. In the "Filters for linked work items" set the Work Item Type value to [Any]
  3. In the Filter options, set the option in the dropdown to "Match top-level work items first" and the Type of Tree to "Parent/Child"
  4. Run the query and look at the results. The minimum columns that I found to work are Work Item Type, Title, State, Area Path and Iteration Path

Run the query in Excel to set the results. Copy the results from the excel worksheet. Open a new instance of Excel, and connect to the new instance of TFS. Select New List, then change the type to Input List.

IMPORTANT! Make sure the columns match between the two workbooks. If you have a Column called Title 1, Title 2, Title X then click the title column and click "Add Tree Level" to create the same columns. 2. Paste the results into the new worksheet. Change all the values in the "State" column to "New". Any other value may not import. Make sure to update the Area Path and Iteration Path to the correct values.

The minimum columns I found that do the correct import are: 1. Work Item Type 2. Title 3. State 4. Area Path 5 Iteration Path.

When I tried to import the Epics with children it would constantly fail. So I did the export with children from the Features down to stories and tasks/bugs and it worked.

john
  • 1,273
  • 3
  • 16
  • 41