使用 TFS REST API 获取迭代中的所有工作项 [英] Using the TFS REST API to get all work items in an iteration

查看:41
本文介绍了使用 TFS REST API 获取迭代中的所有工作项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取有关当前 sprint 中所有用户故事的一些信息.我可以轻松获取当前 sprint 的路径,并给出工作项的 ID 列表,我可以从它们中获取我需要的内容,但我不确定如何仅从迭代路径中获取这些 ID.

I am attempting to get some information about all User Stories in the current sprint. I can get the path to the current sprint easily, and given a list of the IDs for the work items I can get what I need from them, but I am unsure of how to get those IDs from just the iteration path.

我已经看到一个使用 C# 和查询的示例,但我使用的是 javascript 和 REST API,如果可能,我不希望用户查询.

I have seen an example of this using C# and queries, but I am using javascript and the REST API, and I would prefer not to user queries if possible.

推荐答案

实现这一目标的最佳方法是使用 queries 旨在帮助您查找要查看、分类、更新或在报告中列出的工作项.

The best way to achieve this is using queries which designed to help you find work items that you want to review, triage, update, or list in a report.

REST API 还支持工作项查询语言.有一个参数 [System.IterationPath] 满足您的要求.

The Work Item Query Language is also supported with REST API. There is a Parameter [System.IterationPath] which meets your requirement.

更多详细信息请参考:

以编程方式查询工作项

• REST API:工作项查询和查询文件夹工作项查询语言

• REST APIs: Work item queries and query folders and Work item query language

这篇关于使用 TFS REST API 获取迭代中的所有工作项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆