Share via


作業項目の履歴テーブル

更新 : 2010 年 7 月

次の図に示すように、FactWorkItemHistory およびそれに関連付けられているディメンション テーブルを使用して、バグ、タスク、およびその他の種類の作業項目に関する履歴データを照会できます。 履歴データでは、作業項目のステータスに関する情報や、時間の経過とともに変化した作業項目のフィールドの値に関する情報が提供されます。 作業項目の履歴テーブルから作成されるレポートの一例として、進行状況グラフやバーンダウン グラフが挙げられます。 データは補正レコードを使用して格納されます。 補正レコードの詳細については、「Visual Studio ALM におけるレポート作成に関する新機能」を参照してください。

"作業項目の履歴" のファクト テーブル

FactWorkItemHistory は、FactCurrentWorkItem テーブルおよび次のディメンション テーブルに関連付けられています。

  • DimArea

  • DimIteration

  • DimPerson

  • DimTeamProject

次のサンプル クエリを使用すると、特定のユーザー ストーリーについて 2009 年 9 月 21 日から 2009 年 9 月 30 日までの履歴作業負荷の傾向を調べることができます。 このクエリは、チーム プロジェクトの各ユーザー ストーリーについて、合計の実績作業、最初の見積もり作業、残存作業時間、およびこの期間の日の合計のストーリー ポイントに関する情報を返します。 ユーザー ストーリーの詳細については、「ユーザー ストーリー (アジャイル)」を参照してください。

注意

このクエリでは、ユーザー ストーリーが子リンクを介して他の作業項目にリンクされていると想定しています。

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 Web サイトの「COALESCE (Transact-SQL)」を参照してください。

補正レコードの詳細については、Microsoft Web サイトの「NEricson's Weblog (NEricson のウェブログ)」を参照してください。

参照

その他の技術情報

バーンダウン Excel レポート

テスト チームの進捗 Excel レポート

Visual Studio ALM におけるレポート作成に関する新機能

Visual Studio ALM 用のリレーショナル ウェアハウス データベースを使用したレポートの生成

履歴の変更

日付

履歴

理由

2010 年 7 月

リンク ディメンション テーブルのリストが追加されました。

情報の拡充