TFS 2013 API - 检索WI所做的所有更改 [英] TFS 2013 API - Retrieve all changes made for WI

查看:248
本文介绍了TFS 2013 API - 检索WI所做的所有更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道让所有修改工作项目相关的知识,就像每天多少小时已记录?这个信息是所有更改选项卡TFS的网页版得到,但我无法通过调试工作项对象的所有方法和属性看找到它。

Does anybody knows how to get all changes related to work item, like how many hours were logged per day? This info is obtainable in web version of TFS in 'All Changes' tab but I couldn't find it by looking through all methods and properties of WorkItem object in debug.

我也试着检索工作项目由工作项属性上RevisionCollection的索引,返回修改的对象,但所有这些工作项目似乎被引用到WI的最终状态在那里所有的时间都被记录,任务是关闭的。

I've also tried to retrieve work items by WorkItem property on RevisionCollection's indexer which returns Revision object, but all these work items seems to be referencing to the final state of WI where all hours have been logged and the task is closed.

推荐答案

如果你的意思是你要显示所有的历史(哪些领域对于某些工作项目类型(用户故事,任务,错误)

If you mean you want to show all the history (what fields changed, when and by who) for certain work items types (user stories, Tasks, Bugs)

有没有API可以只直接显示所有更改选项卡中的信息。如果您检索的工作项目如下

There is no API can just show 'all changes' tab info directly. And if you retrieve work items as below

   foreach (Revision revision in wi.Revisions)
            {
                Debug.Write(revision.WorkItem);
            }



修订历史记录只能为集合<中可用的工作项字段检索A HREF =https://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.fieldcollection(v=vs.120).aspx相对=nofollow> WorkItem.Fields ,您将不会查看历史
,但最终一次又一次地重新加载当前工作项的对象。

The revision history can only be retrieved for work item fields available in the collection WorkItem.Fields,you will NOT see the history but end up reloading the current workitem object again and again.

更多细节,你可以参考以下链接其中有如何做到这一点在C#中一个很好的例子:的工作项历史展示台TFS API

More details, you can refer below link which has a pretty good example of how to do it in C#: Work Item History Visualizer using TFS API

这篇关于TFS 2013 API - 检索WI所做的所有更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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