From 3f968c1c0c6b5ed30befca9f4b76dba4c85e0319 Mon Sep 17 00:00:00 2001 From: Vanya Kashperuk Date: Sat, 18 May 2024 23:53:52 -0400 Subject: [PATCH] Change "new work item url" to use the correct format (https://dev.azure.com/{organization}/{project}/_workitems/create/{workItemType}) --- Source/TeamFoundation.WebApi/HyperlinkFactory.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/TeamFoundation.WebApi/HyperlinkFactory.cs b/Source/TeamFoundation.WebApi/HyperlinkFactory.cs index d17598e..c0325d0 100644 --- a/Source/TeamFoundation.WebApi/HyperlinkFactory.cs +++ b/Source/TeamFoundation.WebApi/HyperlinkFactory.cs @@ -41,16 +41,15 @@ public Uri GetIdentityImageUrl(Guid id) public Uri GetNewWorkItemUrl(string workItemType, bool fullScreen = true) { - // E.g. https://microsofthealth.visualstudio.com/Health/_queries?witd=Bug&id=1&_a=new&fullScreen=true + // E.g. https://microsofthealth.visualstudio.com/Health/_workitems/create/User%20Story UriBuilder builder = new UriBuilder(this.BaseUrl); - builder.Path = CombinePath(builder.Path, ProjectName, "_queries"); + builder.Path = CombinePath(builder.Path, ProjectName, "_workitems", "create", Uri.EscapeDataString(workItemType)); - AddQueryParam(builder, "witd", workItemType); - AddQueryParam(builder, "_a", "new"); if (fullScreen) { AddQueryParam(builder, "fullScreen", "true"); } + return builder.Uri; }