如何使用 TFS REST API 获取迭代中的剩余天数 [英] How to get Days Remaining in Iteration using TFS REST API

查看:40
本文介绍了如何使用 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}

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

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