I use TFS 2010 and I need using TFS API to retrieve an information about work items that were deleted. There is a table [WorkItemsDestroyed] in the TFS DB that contains the information about destroyed work items. Is there any way to get that information using TFS API?
-
1Does this help? http://stackoverflow.com/a/9185435/728929 – pantelif Jun 21 '12 at 11:25
-
Thanks for your advice, but I have no possibility to access tfs Db - using TFS API only – Max Suhinin Jun 21 '12 at 12:14
2 Answers
It depends on what information you want to retrieve. If you want to find out who deleted the work item then you can do that with sql (@pantelif comment).
If you want to retrieve information about the work item itself I think there is not any way to do that, either from TFS API or sql command. As described at this post, you cannot recover deleted work items:
Deleting Work Item Action Is Not Recoverable

- 9,659
- 7
- 50
- 87
Actually, as long as the test plan has not been deleted, there should be full history of the actual test results allowing you to recover from the deletion of a test suite...it may take a bit of time, but process works.
Try this to re-create your test suites and associated results.
Recreate the suite. Add tests if not a query-enable suite. From Test tab, select your suite within the hierarchy. Create some initial results to allow you to see full history for each test. Within the test lists pane, mass-select all test results and set them to blocked. Now when you open each test result, you will see full list of previous test results history associated to each test case at the bottom of the results window. In other words, you need to trigger an initial result to see the full history. For any results only carrying a single “Blocked” result, the test has not been executed. (first time the result has been made) For tests that have additional results associated to it, identify the last known state (see the Created date column), then set it appropriately (Pass/Fail/Blocked) NOTE: This will only work as long as the Test Plan has not been deleted. If it is simply a test suite, this should get you back up and running quickly.

- 1