如何在TFS批量更新多个工作项目 [英] How to batch update multiple workitems in TFS
本文介绍了如何在TFS批量更新多个工作项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要更新同一字段相同的值数百工作项目的TFS。有没有办法做到这一点在批处理,而不是由一个手动一者来更新他们的?
I need to update same field to same value for hundreds of workitems in TFS. Is there any way to do it in a batch instead of updating them manually one by one?
推荐答案
您可以做到这一点的 Excel中
- 打开Excel中的工作项目,通过:
- 右键单击团队资源管理器的查询 - >在Excel中打开
- 多选择在WIT结果窗格中的一些工作项目,然后点击右键 - >打开Excel中
- 加载Excel,使用Team - >导入来加载predefined查询
- 打开一个已绑定到TFS一个* .xls文件
完整文档:
在Excel (概述页面管理工作项目;许多与放大器;很多链接内部)
Full documentation: Managing work items in Excel (overview page; lots & lots of links inside)
Windows命令行
REM make Martin Woodward fix all my bugs
tfpt query /format:id "TeamProject\public\My Work Items" |
tfpt workitem /update @ /fields:"Assigned To=Martin"
Powershell的
# make Bill & Steve happy
$tfs = tfserver -path . -all
$items = $tfs.wit.Query("
SELECT id FROM workitems
WHERE [Created By] IN ('bill gates', 'steve ballmer')") |
% {
$_.Open()
$_.Fields["priority"].value = 1
$_
}
# note: this will be much faster than tfpt since it's only one server call
$tfs.wit.BatchSave($items)
这篇关于如何在TFS批量更新多个工作项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文