gpt4 book ai didi

api - 如何批量更新TFS中的多个工作项

转载 作者:行者123 更新时间:2023-12-02 02:26:23 25 4
gpt4 key购买 nike

我需要将 TFS 中数百个工作项的相同字段更新为相同值。有什么办法可以批量完成而不是手动逐一更新吗?

最佳答案

您可以在Excel中执行此操作:

  1. 通过以下方式在 Excel 中打开工作项:
    • 右键单击团队资源管理器中的查询 -> 在 Excel 中打开
    • 在 WIT 结果 Pane 中多选一些工作项,然后右键单击 -> 在 Excel 中打开
    • 加载 Excel,使用 Team -> Import 加载预定义查询
    • 打开已绑定(bind)到 TFS 的 *.xls 文件
  2. 进行批量修改
  3. 点击“团队”功能区上的“发布”按钮

enter image description here

完整文档: Managing work items in Excel (概述页面;里面有很多很多链接)

You can bulk-edit in the web interface too

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)

关于api - 如何批量更新TFS中的多个工作项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1210571/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com