更新:2010 年 7 月
您可以使用 FactWorkItemHistory 和相關聯的維度資料表來查詢 Bug、工作和其他工作項目類型的歷程資料,如下圖所示。 歷程資料會提供工作項目狀態的相關資訊,或是隨著時間變更之工作項目的欄位值。 進度和待執行工作圖表就是根據工作項目記錄資料表所建置的報表範例。 其資料是使用補償記錄來儲存。 如需補償記錄的詳細資訊,請參閱 Visual Studio ALM 報告的新功能。
.png)
FactWorkItemHistory 與 FactCurrentWorkItem 以及下列維度資料表相關聯:
DimArea
DimIteration
DimPerson
DimTeamProject
您可以使用下列範例查詢來針對特定使用者本文尋找介於 2009-09-21 與 2009-09-30 之間的歷程工作負載趨勢。 這個查詢會針對 Team 專案中的每個使用者本文傳回有關下列項目的資訊:已完成工作總計、原始估計的工作、剩餘工作,以及該期間內每天的本文點總計。 如需使用者本文的詳細資訊,請參閱使用者本文 (Agile)。
注意事項 |
|---|
這個查詢會假設使用者本文透過子連結連結至其他工作項目。 |
declare @TeamProjectNodeSK int
select @TeamProjectNodeSK = ProjectNodeSK from GetProjectNodeInfoFromReportFolder(N'/TfsReports/VSTSDF/ProcessDev10')
-- This table value function returns the ProjectNodeSK: the Surrogate Key of a team project under a certain area path.
declare @TeamProjectCollectionGuid nvarchar(36)
select @TeamProjectCollectionGuid = pc.ProjectNodeGUID from DimTeamProject p inner join DimTeamProject pc on p.ParentNodeSK = pc.ProjectNodeSK where p.ProjectNodeSK = @TeamProjectNodeSK
-- This query finds the team project collection GUID by joining TeamProject.ParentNodeSK to TeamProject.ProjectNodeSK
select
d.DateSK
,wi.System_Title
,wi.System_Id
,coalesce(sum(wih_child.Microsoft_VSTS_Scheduling_CompletedWork), 0) as Total_CompletedWork, -- Finds the total number of hours of completed work.
coalesce(sum(wih_child.Microsoft_VSTS_Scheduling_OriginalEstimate), 0) as Total_OriginalEstimate --Finds the total number of hours of original estimate.
,coalesce(sum(wih_child.Microsoft_VSTS_Scheduling_RemainingWork), 0) as Total_RemainingWork--Finds the total number of hours of remaining work.
,coalesce(sum(wih_child.Microsoft_VSTS_Scheduling_StoryPoints), 0) as Total_StoryPoints --Finds the total story points.
from
DimDate d
cross apply
DimWorkItem wi
cross apply
GetWorkItemsTree(@TeamProjectCollectionGuid, wi.System_Id,
N'Child', d.DateSK) wit
left join
FactWorkItemHistory wih_child
on wih_child.WorkItemSK = wit.ChildWorkItemSK
where
d.DateSK >= N'2009-09-21 00:00:00.000'
and d.DateSK <= N'2009-9-30 00:00:00.000'
and wi.TeamProjectSK = @TeamProjectNodeSK
and wi.System_WorkItemType = N'User Story'
and wi.System_ChangedDate <= d.DateSK
and wi.System_RevisedDate > d.DateSK
and wi.System_State = N'Active'
and (wih_child.RecordCount != -1 or wih_child.RecordCount is null)
group by d.DateSK, wi.System_Id, wi.System_Title
其他資源
如需詳細資訊,請參閱下列 Microsoft 網站的網頁:COALESCE (Transact-SQL)。
如需補償記錄的詳細資訊,請參閱下列 Microsoft 網站的網頁:NEricson 的部落格 (英文)。
請參閱
概念
其他資源
使用 Visual Studio ALM 的關聯式倉儲資料庫建立報表
變更記錄
日期 |
記錄 |
原因 |
|---|---|---|
|
2010 年 7 月 |
已連結之維度資料表的新增清單。 |
資訊加強。 |
注意事項