简体   繁体   English

Azure DevOps 批量更新自定义字段

[英]Azure DevOps Bulk Updating a Custom Field

All, I have a custom field that was added to TFS Azure DevOps and now I need to update any Feature or Story that have a certain text in that field.所有,我有一个自定义字段已添加到 TFS Azure DevOps,现在我需要更新在该字段中有特定文本的任何功能或故事。

Example: Custom field: PGM0001234 (present both on Features and Stories)示例:自定义字段:PGM0001234(同时出现在功能和故事中)

Change to: PROG0004567更改为:PROG0004567

Is there a way to do that either on the backend or VisualStudio?有没有办法在后端或 VisualStudio 上做到这一点? There are thousands of work items that need updating so it's not like it's less than 100 feature/stories.有数以千计的工作项需要更新,所以它不会少于 100 个功能/故事。

Yes.是的。 Create a new Query from ../_queries and set the Field to your custom field.../_queries创建一个新查询并将Field设置为您的自定义字段。

在此处输入图像描述

Run the query, and the results will contain all items where your custom field contains the value PGM0001234.运行查询,结果将包含您的自定义字段包含值 PGM0001234 的所有项目。

In the results set, select all and then click the ... after one of the items and choose Edit from the menu.在结果集中,select all 然后单击其中一项后的...并从菜单中选择 Edit。

在此处输入图像描述

In the Edit work items dialog, select your custom field and assign new value in the Value field.在编辑工作项对话框中,select 您的自定义字段并在值字段中分配新值。 Click OK and you'll be taken back to the query results with everything in bold.单击确定,您将返回查询结果,所有内容均以粗体显示。 Press 'Save Items` and TFS will then apply the change.按“保存项目”,然后 TFS 将应用更改。

在此处输入图像描述

TFS may complain that some fields contain invalid fields, such as Assigned To is a user who has left the business. TFS可能会抱怨某些字段包含无效字段,例如Assigned To是已离开业务的用户。 You may need to bulk-reassign those items to another user in the Edit work items dialog.您可能需要在“ Edit work items ”对话框中将这些项批量重新分配给其他用户。

Another option is to use Excel.另一种选择是使用 Excel。 Create a query like the one mentioned above, then open that query in the Excel plugin for Azure DevOps.像上面提到的那样创建一个查询,然后在 Azure DevOps 的 Excel 插件中打开该查询。 Do a search and replace or other bulk edit in excel and then het the publish changes button.在 excel 中进行搜索和替换或其他批量编辑,然后点击发布更改按钮。

Excel is a really convenient way to bulk edit work items. Excel 是一种非常方便的批量编辑工作项的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM