GibsonCode
GibsonCode

Reputation: 89

Show iterations for work item in TFS

I made a mistake in Team Foundation Server 2013 when trying to clean up our iterations. Our iteration path set up for the longest time was:

TFS PROJECT
    Sprint 1
    Sprint 2
    ...

There were discussions within the team, so I changed the Iteration path set up to this:

TFS PROJECT
    Iteration Group
        Sprint 1
        Sprint 2
        ...
    Readied Work

Well, after experimenting, I decided to move all the sprints under their parent Iteration Group back to the main TFS PROJECT parent. Unfortunately (this is where the mistake occurred), I deleted the Iteration Group container, thinking the Iterations would be re-parented. In doing so, all the child iterations were deleted and the work items that had been previously associated with each sprint were reallocated to the top parent, TFS PROJECT. The iteration path structure now looks like this:

TFS PROJECT
    Readied Work

I have already recreated the iterations, as we did not have a backup of the project/collection to which I could have rolled back. The DBA team is hands off the TFS database, so they are not available to assist. I know how Areas/Teams/etc work in TFS, but I am not familiar with the database structure.


Given that I am able to see all the work items on the TFS portal, is there a way to show all IterationIDs each Product Backlog Item has been associated with, in a list?

I would prefer to NOT look at the history of each PBI, as there are a lot.

Upvotes: 0

Views: 1208

Answers (2)

As you only has a few iterations could use the 'was ever' operator. If you create a query and add a filter of IterationPath was ever '/project/group/iteration 1' you will see the work items that were ever under that node. You can then bulk edit everything you find under the desired path..

Upvotes: 2

Jason Williams
Jason Williams

Reputation: 57892

First, I'd strongly recommend against touching the SQL database directly.

Using the TFS API you can query work items, and you can use the 'AsOf' operator to get the state from a historical point in time. Using this it wouldn't take much work to query the area/iteration paths of all your work items from 2 days ago, and then write them back to the current work items.

Upvotes: 3

Related Questions