如何使用 TFS REST API 获取迭代中的剩余天数

问题描述:

我目前正在使用 REST API 版本 2.0 并使用 PowerShell 连接到我的 TFS 实例.我可以获得以下信息:

I am currently using the REST API version 2.0 and connecting to my TFS instance with PowerShell. I can get the following information:

迭代ID
迭代名称
团队成员
使用以下示例的每天团队成员容量

Iteration ID
Iteration Name
Team Member
Team Member Capacity Per day using the example below

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/work/TeamSettings/Iterations/{iterationid}/capacities/{member}?api-version={version}

我不知道如何获得迭代中剩余的天数.

I can not figure out how to get the days remaining in the iteration.

没有这样的直接 api 来获取迭代中剩余的天数.您需要使用下面的 api 获取迭代的团队设置,以在teamSettings"中获取startDate"、finishDate"、workingDays"并计算迭代中剩余的天数:

There is no such direct api to get the days remaining in the iteration. You need to get the team setting for an iteration with api below, to get "startDate", "finishDate", "workingDays" in "teamSettings" and calculate the days remaining in the iteration:

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/work/TeamSettings/Iterations/{iterationId}?api-version={version}