取回的注释历史在TFS工作项 [英] Fetching the comment history for a work item in TFS
问题描述
在大多数缺陷跟踪器有一个带票/事件/问题/工作项相关评论的历史。
In most defect trackers there is a comment history associated with a ticket/incident/issue/work item.
我希望得到来自TFS相同的信息通过SDK的一个工作项目 - 理想的:
I wish to get this same information from TFS via the SDK for a work item - ideally:
- 谁创造了注释。
- 注释的文本。
- 最后更新/编辑的注释(如果这是事件可能在TFS?)
我已经确定了一个工作项目有修订通过的修订物业速效的集合,并且您可以通过每个版本循环 - 但是修订版不具有历史的属性,我认为我能找到的评论由用户创建的。此外,我不相信这是强制性的记录与每次更改的注释 - ?所以我怀疑我会需要忽略那些没有任何历史属性信息的修改
I have determined that a WorkItem has a collection of revisions availabe via the "Revisions" property, and that you can loop through each revision - but a revision does not have a "History" property where I assume I could find the comment created by the user. Also I don't believe it's compulsory to record a comment with each change - so I suspect I will need to ignore revisions that don't have any history property information?
<一个href="http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitem.revisions%28VS.80%29.aspx">Revisions MSDN上地产
在获取这一评论历史的信息在TFS工作项目的最佳办法有什么想法? - 是的修订列出正确的方式,或者我应该使用API的其他部分。
Any thoughts on the best way to fetch this "comment history" information for a work item in TFS - is the revisions list the correct way, or should I be using some other part of the API?
推荐答案
为了获取你需要访问的历史性工作项目修订的注释历史。
In order to fetch the comment history you need to access the "History" property on the Work Item revision.
<一个href="http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.workitem.history.aspx">WorkItem.History物业
显然,当前的(最新)版本的工作项目都会有这个字段为空,但历史修订意见将在那里。
Obviously the current (latest) version of the work item will have this field as empty, but historical revision comments will be there.
在团队资源管理器显示在工作项的历史是通过在Revissions循环,并在历史记录属性同时显示已更改的字段和文本内置
The "History" displayed on a work item in Team Explorer is built by looping through the Revissions and displaying both the fields that were changed and the text in the "History" property
这篇关于取回的注释历史在TFS工作项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!