NateF

Is there a way to mass undo a series of changes that were published to the database One of the users decided to push the Publish button in Excel and accidentally updated a large number of requirements with incorrect Description data. This is the pseudo SQL I'd like to run, but I don't know the TFS DB well enough to know how to do it...

UPDATE * from WorkItemTable

SET CurrentDescription = LastRevisionsDescription

WHERE ChangedDate = DateWhereErrorsWereUploaded

AND User = Somebody

AND WorkitemType = ProductRequirement



Re: Team Foundation Server - Work Item Tracking Rolling back changes to work items

Dan Kershaw

TFS does not feature a rollback mechanism for work item tracking. One option might be to restore the DB from a back-up (but this is pretty heavy handed).

I would STRONGLY suggest that you DO NOT directly modify the database. This is not supported, plus there are a number of tables in work item tracking that would be affected, and your suggested change would likely break work item tracking, or lead to inconsistent data in the ProductRequirement work items.

Removing previous revisions in not possible currently. One thing you can do is to use Excel to bulk edit all the affected work items to restore the description back to how you want it. Note that the erroneous revision will still exist in the history of the work items.

Please let me know if this is sufficient,






Re: Team Foundation Server - Work Item Tracking Rolling back changes to work items

tspascoal


The best way to do it, would be to write a small amount of code to revert the changed via the work item store object model.


It shouldn't take more than 30 minutes. (which i assume would be a lot less work than manually consult the history of all affected work items and do the change by hand :-)).





Re: Team Foundation Server - Work Item Tracking Rolling back changes to work items

Michael Ruminer

Just to throw some more support behind the 'don't modify the database' thread. Excel was your enemy in this case now use it to fix the error and make Excel your friend. Not to discount using the OM proposition but the Excel mechanism will require no testing and is more friendly andster I would imagine a faster fix,

Good luck.