none
WorkItem 父ID是哪个字段 RRS feed

答案

  • 你好,

    Tfs_Warehouse 数据库的 [dbo].[FactWorkItemLinkHistory] 表里,TargetWorkItemID 是 一个 workitem link workitem 的 ID,你可以执行下面的Sql 语句去找work item 的 Parent ID :

    SELECT [SourceWorkItemID]
          ,[TargetWorkItemID]
          
      FROM [Tfs_Warehouse].[dbo].[FactWorkItemLinkHistory] a left join [Tfs_Warehouse].[dbo].[DimWorkItemLinkType] b on a.WorkItemLinkTypeSK=b.WorkItemLinkTypeSK
      where SourceWorkItemID=458 and b.LinkName='Parent'





    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • 已标记为答案 bridge bai 2017年7月21日 1:01
    2017年7月20日 11:33

全部回复

  • 你好,

    Tfs_Warehouse 数据库的 [dbo].[FactWorkItemLinkHistory] 表里,TargetWorkItemID 是 一个 workitem link workitem 的 ID,你可以执行下面的Sql 语句去找work item 的 Parent ID :

    SELECT [SourceWorkItemID]
          ,[TargetWorkItemID]
          
      FROM [Tfs_Warehouse].[dbo].[FactWorkItemLinkHistory] a left join [Tfs_Warehouse].[dbo].[DimWorkItemLinkType] b on a.WorkItemLinkTypeSK=b.WorkItemLinkTypeSK
      where SourceWorkItemID=458 and b.LinkName='Parent'





    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • 已标记为答案 bridge bai 2017年7月21日 1:01
    2017年7月20日 11:33
  • 好的,我去尝试一下,非常感谢
    2017年7月21日 1:01