查询 TFS 2010 数据库以获取昨天的所有签到(按项目排序)
我正在尝试为 TFS 2010 数据库编写一个查询,该查询将返回团队项目订购的所有昨天的签到。到目前为止,我已经:
USE [Tfs_DefaultCollection]
SELECT ChangeSetId, CreationDate, Comment, CommitterId
FROM tbl_ChangeSet
WHERE CreationDate > DATEADD([day], -2, GETDATE()) /*not perfect*/
AND CreationDate < GETDATE();
我不确定如何将 CommitterId 映射到实际的用户名,而且我什至不确定从哪里开始获取发生签入的团队项目的名称。有什么想法吗?
I'm trying to write a query for the TFS 2010 database that will return all of yesterday's checkins ordered by Team Project. So far I have:
USE [Tfs_DefaultCollection]
SELECT ChangeSetId, CreationDate, Comment, CommitterId
FROM tbl_ChangeSet
WHERE CreationDate > DATEADD([day], -2, GETDATE()) /*not perfect*/
AND CreationDate < GETDATE();
I'm not sure how to map CommitterId to an actual user name, and I'm not really even sure where to begin in getting the name of the Team Project in which the checkin occurred. Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在查询 TFS 的操作数据存储。这是不受支持的,也是一种不好的做法。相反,请使用 TfsWarehouse,它具有更好的查询数据的聚合模型。
You are querying the operational datastore of TFS. This is not supported and a bad practice. Instead please use the TfsWarehouse which has a much better aggregated model of querying your data.