【问题标题】:Query Logic - Finding current/previous states of work items查询逻辑 - 查找工作项的当前/先前状态
【发布时间】:2014-10-04 09:21:14
【问题描述】:

我需要在 TFS 中运行查询以确定在特定时间范围内工作项上是否发生了特定操作。

例如,我想查看上周标记为“测试失败”的所有工作项。

我不能只添加“State = Failed Test”,因为工作项可能不再处于“Failed Test”状态(此时可能已修复)。我需要的是“状态在此日期范围内的任何时候都未通过测试”。

想法?

【问题讨论】:

    标签: tfs tfs-workitem


    【解决方案1】:

    您无法使用工作项查询执行此操作,但您可以使用 SQL 对 TFS 数据仓库执行此查询(例如,在自定义 SSRS 报告中)。

    PS - 我相信您想要的表是 FactWorkItemHistory 和 DimWorkItem(来自 Tfs_Warehouse 数据库)

    【讨论】:

      【解决方案2】:

      您可以使用Was Ever 运算符来检查字段过去是否具有某些值。您的 WIQL 查询将如下所示: SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.TeamProject] = @project AND [System.State] EVER 'Failed Test' AND [System.ChangedDate] IN (@today -1, @today - 2, @today -3, @today -4, @today -5, @today -6, @today -7) ORDER BY [System.Id]

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-10-09
        • 2012-11-04
        • 1970-01-01
        • 2014-04-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多