Welcome to EMC Consulting Blogs Sign in | Join | Help

Merrick Chaffer's Blog

Missing TFS WorkItem Description and History

If you ever have a need to manually update the [Changed Date] fields in the WorkItemsWere, WorkItemsAre and WorkItemsLatest tables in a TFS database, then ensure that you also update the WorkItemLongTexts table and set the [AddedDate] equal to or less than the date you set in the other tables for the given [ID] and Revision [Rev].

If this is not done then you will notice that the Description and History assigned to a specific revision of a work item, simply does not show up when using the Team Explorer interface in Visual Studio, although for some reason it will show up in the web interface via http://<myTFSserver>:8080/WorkItemTracking/WorkItem.aspx?artifactMoniker=<myWorkItemID>

I believe this to be down to the following select statement in one of the user defined functions they use...

ALTER function [dbo].[xxW_WorkItem_1048_AQUAAAAAAAUVAAAAPeMITdoW6yMjX2NroB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=] () returns table as return

...

select I.*

from dbo.WorkItemsAreUsed I with (nolock)

left join dbo.WorkItemsLatestUsed W with (nolock)

    on I.[System.Id] = W.[System.Id]

where ...

select * from dbo.WorkItemLongTexts K

                          where

                          K.AddedDate <= I.[System.ChangedDate] and datalength(K.Words) > 0

                          and K.ID = I.[System.Id] and K.FldID=10045

                          and K.AddedDate >= all

                                                (

                                                    select L.AddedDate

                                                    from dbo.WorkItemLongTexts L

                                                    where

                                                    L.ID = K.ID and L.FldID=K.FldID

                                                )

                         )))

Published 27 November 2006 16:40 by merrick.chaffer
Filed under:

Comments

 

hinshelm said:

TFS Event Handler project now available on CodePlex: http://www.codeplex.com/TFSEventHandler

May 1, 2007 10:10
Anonymous comments are disabled

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems