次の方法で共有


作業項目の履歴テーブル

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

SQL Server Analysis Services キューブのこれらのテーブルに関連付けられているメジャーとディメンションの詳細については、「作業項目パースペクティブを使用した作業項目とテスト ケース データの分析およびレポート」を参照してください。

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

FactWorkItemHistory は、以下のディメンション テーブルに関連付けられています。

  • DimArea

  • DimIteration

  • DimPerson

  • DimTeamProject

  • DimWorkItem

次のサンプル クエリを使用すると、特定のユーザー ストーリーについて 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」のページをご覧ください。

参照

概念

作業項目パースペクティブを使用した作業項目とテスト ケース データの分析およびレポート

バーンダウン Excel レポート

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

Visual Studio ALM のリレーショナル ウェアハウス データベースのテーブル リファレンス