1

We have a Team Project Collection Source Control Setting for Check-in Notes that requires each check-in to capture a "Tracking Number". This number is external to TFS. I need to search for all the changesets that have a specific Tracking number.

The resulting changeset list tells me what to get latest version on, for a monthly deployment.

We don't use Work Items.

Question 1) Where in tfs_default_collection are the notes stored? One way to easily look would be to query with .SQL. I don't see "Note" in any of the database schemas.

Question 2) If I can't use .SQL to search, what object reference in Microsoft.TeamFoundation.VersionControl.Client.dll will give me the details of the Check-in Notes?


If I know what the changeset number is, then I can do something like this to give me the list.

-- these are all the .slq objects checked in $Release on '2013-01-28'

SELECT 
    chg_set.CreationDate,
    chg_set.ChangeSetId, 
    v.FullPath
FROM dbo.tbl_ChangeSet (nolock)AS chg_set 
    INNER JOIN dbo.tbl_Version (nolock)AS v ON chg_set.ChangeSetId = v.VersionFrom 
    LEFT OUTER JOIN dbo.tbl_File (nolock) AS f ON v.FileId = f.FileId
WHERE chg_set.CreationDate >= '2013-01-31'
and FullPath like '%Tracker\Releases\2013.02.31%'
and FullPath like '%.sql%'
ORDER BY chg_set.CreationDate, v.FullPath

After some more digging into TFS_DefaultCollection I found it.

I can join these results with the query above and see exactly what I am looking for.

SELECT ReleaseNoteId, FieldName, BaseValue
from Tfs_DefaultCollection.dbo.tbl_ReleaseNoteDetails
  where ReleaseNoteId in (SELECT ReleaseNoteId
FROM Tfs_DefaultCollection.dbo.tbl_ReleaseNote
  where DateCreated between '2013-01-18' and '2013-02-22')
    and FieldName = 'Tracker #'
    and BaseValue <> '0'  -- base value of zero is a merge from $Main

Thank you, in advance.

  • possible duplicate of [How do i find and view a TFS changeset by comment text](http://stackoverflow.com/questions/925875/how-do-i-find-and-view-a-tfs-changeset-by-comment-text) – James Reed Jan 30 '13 at 19:27

0 Answers0