当前迭代是否有 TFS 查询宏?
VS2010 中的 TFS 是否有一种方法可以指定特定迭代是当前迭代,然后返回该迭代以用于类似于 @Project
工作方式的查询?如果没有,是否有办法在 TFS 工作项查询中执行子查询?
Is there a way in TFS in VS2010 to specify that a particular iteration is the current one, and then return that for use in queries similar to the way @Project
works? If not is there a way to do sub-queries in TFS work item queries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
看起来微软听了。
@CurrentIteration
作为令牌添加。当然,那太好了。然而,当您希望针对当前冲刺编写查询时,您可能会忽视先前冲刺中未关闭的工作项。当您使用
@CurrentIteration
时,您可能只是指“已提交给冲刺的所有未完成的工作”。如果您过滤到单个冲刺,您将错过任何未能关闭或从之前的冲刺中前进的掉队者。考虑使用以下模式,其中“ScrumOfScrums\Release 1.0.0.0”是您的待办事项路径,所有冲刺路径都是该模式的子路径:
筛选您的待办事项迭代节点下的工作项,但不等于待办事项迭代节点。这将为您提供致力于冲刺的所有项目。
这还将捕获您之前的冲刺中未关闭的任何项目。由于目标是在移动到下一个冲刺之前关闭冲刺中的每个项目,因此此查询模式通常比使用 @CurrentIteration 更好,除非您要查找当前冲刺中已关闭的项目迭代。
PS 虽然这是一个老问题,但当我搜索有关查询 TFS 中当前迭代的信息时,它是我的热门问题。
Looks like Microsoft listened.
@CurrentIteration
is being added as a token.That’s great, of course. When looking to write a query against the current sprint, however, you are in danger of losing sight of unclosed work items in previous sprints. When you reach for
@CurrentIteration
, you probably just mean “all unfinished work that has been committed to a sprint.” If you filter to a single sprint, you’ll miss any stragglers you failed to close or move forward from previous sprints.Consider using the following pattern, where “ScrumOfScrums\Release 1.0.0.0″ is your backlog path, and all of your sprint paths are children to that:
Filter for work items under your backlog iteration node, but not equal to the backlog iteration node. That will give you all items committed to a sprint.
This will also catch any items that weren’t closed in your previous sprints. Since the goal is to close every item in a sprint before moving to the next one, this query pattern will generally be better than using
@CurrentIteration
, unless you're looking to find the closed items in the current iteration.P.S. While this is an old question, it was my top hit when I searched for info on querying the current iteration in TFS.
恐怕没有这样的宏。我个人只有一些“当前迭代中的 X”团队查询,然后编辑这些查询以在每次迭代开始时指向新的迭代路径。
I'm afraid that there is not such a macro. I personally just have a few "X in current iteration" team queries and then edit those queries to point to the new iteration path at the start of each iteration.
我将尝试为当前迭代使用标准名称,例如“Current”。此迭代的查询都将引用该名称。迭代完成后,我将使用包含日期的命名约定对其进行重命名,然后将使用名称“Current”创建下一个迭代(如果已经存在,则重命名为该名称)。然后查询将返回新迭代的结果。
我不确定以这种方式重命名迭代是否会导致任何冲突或混淆数据仓库,但这将节省在每次迭代开始时创建或修改查询堆的麻烦。
我非常有兴趣听到有关此方法的反馈!
I am going to try using a standard name for the current iteration such as 'Current'. The queries for this iteration would all reference this name. Once the iteration is completed, I will rename it using a naming convention that includes the date for example and the next iteration would then be created with the name 'Current' (or renamed to this if it already exists). The queries would then return results from the new iteration.
I am not sure whether renaming iterations this way will cause any conflicts or confuse the data warehouse for example but this would save on having to create or modify a heap of queries at the start of each iteration.
I would be very interested to hear feedback on this approach!
在日期间隔内查询 Sprint,如下所示:
Query for Sprint in a date interval as shown here:
我发现 Telerik 的免费工作项管理器 为这个问题提供了一个优雅的解决方案。
只需像平常一样定义查询,但忽略与迭代相关的任何过滤器(请注意,这也适用于区域)。有一个名为“区域/迭代过滤器”的树视图窗格,它将根据您在其中选择的迭代(或区域)添加额外的递归过滤。
请注意,如果该窗格不可见,您可以通过“视图”菜单启用它。
I have found that Telerik's free Work Item Manager provides an elegant solution to this problem.
Just define your queries as you usually would but leave out any filters relating to iterations (note that this also applies to areas). There is a treeview pane named 'Area/Iteration Filters' that will add extra, recursive filtering based on the iteration (or area) that you select there.
Note that if the pane is not visible then you can enable it via the View menu.