From 3b27a5d9c37d4f7f27f32f856f0915b78e08ea95 Mon Sep 17 00:00:00 2001 From: Patrick Creehan Date: Fri, 20 Dec 2019 16:37:33 -0500 Subject: [PATCH] Fixing getClassificationNodes api to support no ids --- src/WorkItemTracking/WorkItemTrackingClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/WorkItemTracking/WorkItemTrackingClient.ts b/src/WorkItemTracking/WorkItemTrackingClient.ts index ae96666d..de660a67 100644 --- a/src/WorkItemTracking/WorkItemTrackingClient.ts +++ b/src/WorkItemTracking/WorkItemTrackingClient.ts @@ -211,17 +211,20 @@ export class WorkItemTrackingRestClient extends RestClientBase { */ public async getClassificationNodes( project: string, - ids: number[], + ids: number[] | undefined, depth?: number, errorPolicy?: WorkItemTracking.ClassificationNodesErrorPolicy ): Promise { const queryValues: any = { - ids: ids && ids.join(","), '$depth': depth, errorPolicy: errorPolicy }; + if (ids && ids.length > 0) { + queryValues["ids"] = ids.join(","); + } + return this.beginRequest({ apiVersion: "5.0", routeTemplate: "{project}/_apis/wit/classificationNodes",