通过构建管道在Azure DevOps中创建链接的子项

时间:2019-07-24 12:59:46

标签: azure-devops continuous-integration pipeline continuous-deployment azure-pipelines-release-pipeline

我正在尝试创建一个构建管道,以在Azure DevOps中创建父功能以及链接到父功能的多个子用户故事。

我已使用Azure DevOps扩展来创建工作项,并且已经通过构建管道成功创建了父功能-但我不知道如何在构建中添加更多任务来创建链接到该子对象的子用户故事。父功能。

不适用

预期结果是构建成功完成,并且父功能/链接的子用户故事已成功创建。

1 个答案:

答案 0 :(得分:0)

您可以尝试使用此rest api来执行此操作。您可以将powershell任务添加到构建管道作业,然后将其余api写入脚本。

  {
    "op": "add",
    "path": "/relations/-",
    "value": {
      "rel": "System.LinkTypes.Hierarchy-Reverse",
      "url": "https://dev.azure.com/XXX/_apis/wit/workItems/XXX",
      "attributes": {
        "comment": "Making a new link for the wit "
      }
    }
  }

样本需求主体:

{{1}}

您也可以参考此case以获得帮助。