ddee

Hi,

I have a current work item with state = 1, I change that workitem to state 2. and save that work item.

Is there any way that i can retrieve the previous state = 1

Please help!!!!

Thanks



Re: Team Foundation Server - Work Item Tracking Previous State transition

Vic Tang - MSFT

Depends on how you need to retrieve the previous state information. Do you need to do it programmatically through OM

Or you may directly query against the TfsWorkItemTracking database WorkItemsLatest table. All the previous revisions are stored in this table. ex. To retrieves the previous state for bug# 5000.

SELECT TOP(1) state

FROM WorkItemsWere

WHERE ID=5000

AND state <> (SELECT state FROM WorkItemsLatest where id=5000)

ORDER BY rev DESC

Or you can manually expand the "+" in the bug's description field to see the revision history and find out the previous state.





Re: Team Foundation Server - Work Item Tracking Previous State transition

Vic Tang - MSFT

There is a thread discussing how to retrieve the state change information from the warehouse might be helpful as well

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1295847&SiteID=1