MS Azure - 在 ADO 错误 400 中创建新项目:链接到工作项目需要完整的 url

问题描述 投票:0回答:1

在 MS Azure 中配置我的逻辑应用程序时,我添加了一个逻辑块以在 Azure DevOps 中创建新项目。它工作得很好,但是当我想向已有的功能添加额外的关系时,它就崩溃了。 新创建的项目属于 PBI 类型,我希望它成为现有功能的子项。为此,我添加了链接类型:层次结构反向和链接 URL:完整,指向现有工作项。 参数。我以 https://dev.azure.com/{organization}/{project}/_workitems/edit/{workItemId} 模式提供了 URL 并检查了很多次 - 它确实导致了我想要的功能家长。尽管如此,我还是收到以下错误:

{
  "status": 400,
  "message": "Linking to a work item requires the full url.\r\nAzure DevOps ActivityId: 9ed4db68-cf41-490c-911e-841473dd90be\r\nDetails: {\"$id\":\"1\",\"innerException\":null,\"message\":\"Linking to a work item requires the full url.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,\"eventId\":3000}\r\nclientRequestId: 4134e152-17d9-4cf2-9fa2-c5019d58df30",
  "error": {
    "message": "Linking to a work item requires the full url.\r\nAzure DevOps ActivityId: 9ed4db68-cf41-490c-911e-841473dd90be\r\nDetails: {\"$id\":\"1\",\"innerException\":null,\"message\":\"Linking to a work item requires the full url.\",\"typeName\":\"Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\",\"typeKey\":\"VssPropertyValidationException\",\"errorCode\":0,\"eventId\":3000}"
  },
  "source": "vsts-eus2.azconn-eus2-003.p.azurewebsites.net"
}

您对为什么此 URL 仍然不完整有什么建议吗?有什么解决方案建议吗?

询问chatGPT,确认URL指向正确的资源,在没有添加父子关系的情况下测试了几次(应用程序工作),并且使用它(应用程序中断)。

azure
1个回答
0
投票

您需要的 URL 可能是“获取工作项”调用返回的 URL (https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work- item?view=azure-devops-rest-7.1&tabs=HTTP#get-work-item),而不是用于在 Web 界面中访问的项目。此“其他”URL 的格式为

https://dev.azure.com/{{org}}/_apis/wit/workItems/{{ID}}

我在寻找 Power Automate 中相同问题的解决方案时发现了这篇文章,然后才想起“API URL”的格式不同。这在 Power Automate 中有效,并且可能适用于逻辑应用程序。

© www.soinside.com 2019 - 2024. All rights reserved.