简体   繁体   English

如何不在 azure devops 中的“创建工作项”任务中创建重复项

[英]How not to create duplicates in a task "Create work item" in azure devops

I have pipeline in azure devops.我在 azure devops 中有管道。 In this pipeline i use task "Create work item", how i can not to create duplicates with the same name?在此管道中,我使用任务“创建工作项”,我怎么不能创建具有相同名称的副本? I use classic editor我用经典编辑器

How not to create duplicates in a task "Create work item" in azure devops如何不在 azure devops 中的“创建工作项”任务中创建重复项

You could define an auto-incrementing variable for the name of the workitem.您可以为工作项的名称定义一个自动递增变量。

In this case, the name of each created workitem will be accompanied by an auto-increment variable to distinguish it:在这种情况下,每个创建的工作项的名称将伴随一个自增变量来区分它:

InternalWorkItemID 1

semanticWorkItemID $[counter(variables['InternalWorkItemID'], 0)]

在此处输入图像描述

在此处输入图像描述

The test result:测试结果:

在此处输入图像描述

Besides, we could also define the 2022310 as variable and enable Settable at queue time此外,我们还可以将2022310定义为变量,并在排队时启用Settable

在此处输入图像描述

在此处输入图像描述

We could update the WorkItemTitle at queue the pipeline:我们可以在管道队列中更新WorkItemTitle

在此处输入图像描述

In this case , even if we forget to modify the name of the workitem, there is still a self-increment to distinguish.在这种情况下,即使我们忘记修改工作项的名称,仍然有一个自增来区分。

You can add to duplicates parametr this value "System.Title" and duplicates not creates您可以将此值“System.Title”添加到重复参数中,并且不会创建重复项

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

相关问题 创建带有描述的 Azure DevOps 任务 - Create Azure DevOps task with description azure-devops python 运行“create_work_item”时出错 - azure-devops python error running 'create_work_item' 如何更改 Azure DevOps 工作项中工作项的日期格式 - How to change the date format on a Work Item in Azure DevOps Work item Azure DevOps API 在用户故事下创建任务 - Azure DevOps API Create Task under User Story 如何使用 PowerShell 创建 Azure Devops Wiki 子页面 - How to create Azure Devops Wiki SubPage with PowerShell 如何使用 Azure DevOps API 将工作项与测试结果相关联? - How to associate a work item with a test result using the Azure DevOps API? 有没有一种方法可以使用 Rest API 从 Azure 逻辑应用程序创建 Azure DevOps 工作项? - Is there a way that we can create Azure DevOps work items using Rest API from Azure Logic apps? 创建自动 PR 并完成 Azure DevOps - Create an automatic PR and complete it Azure DevOps Azure Devops 查询以查找每天花在工作项目上的时间 - Azure Devops Query to find Daily hours spent on Work item 如何从发布任务修改 Azure DevOps 发布定义变量? - How to modify Azure DevOps release definition variable from a release task?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM