0

我正在尝试从 TFS 获取所有当前项目名称和请求名称,这些名称未关闭且修补程序为“1”。这是我使用的查询

Select Distinct  wi.System_Title,TP.ProjectNodeName
FROM Tfs_Warehouse.dbo.FactCurrentWorkItem FCWI

INNER join Tfs_Warehouse.dbo.DimTeamProject TP
ON  FCWI.LastUpdatedDateTime = TP.LastUpdatedDateTime
INNER JOIN Tfs_Warehouse.dbo.DimWorkItem wi
        ON TP.ProjectNodeSK = wi.TeamProjectSK
WHERE
wi.CDS_Project_HotFixRelated LIKE '1' AND
System_state NOT LIKE 'Closed'
AND wi.System_IsDeleted  = '0'
AND wi.System_WorkItemType  LIKE 'Request'
Order by System_Title DESC

如果我使用 Tfs_Warehouse.dbo.DimWorkItem 而不是 FactCurrentWorkItem 我可以获得结果,但 Tfs_Warehouse.dbo.DimWorkItem 的问题在于它也显示了所有历史记录,包括不再存在的项目状态

4

0 回答 0