in api/WorkApi.ts [460:516]
public async getBoardMappingParentItems(
teamContext: TfsCoreInterfaces.TeamContext,
childBacklogContextCategoryRefName: string,
workitemIds: number[]
): Promise<WorkInterfaces.ParentChildWIMap[]> {
if (childBacklogContextCategoryRefName == null) {
throw new TypeError('childBacklogContextCategoryRefName can not be null or undefined');
}
if (workitemIds == null) {
throw new TypeError('workitemIds can not be null or undefined');
}
return new Promise<WorkInterfaces.ParentChildWIMap[]>(async (resolve, reject) => {
let project = null;
let team = null;
if (teamContext) {
project = teamContext.projectId || teamContext.project;
team = teamContext.teamId || teamContext.team;
}
let routeValues: any = {
project: project,
team: team
};
let queryValues: any = {
childBacklogContextCategoryRefName: childBacklogContextCategoryRefName,
workitemIds: workitemIds && workitemIds.join(","),
};
try {
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
"6.1-preview.1",
"work",
"186abea3-5c35-432f-9e28-7a15b4312a0e",
routeValues,
queryValues);
let url: string = verData.requestUrl!;
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
verData.apiVersion);
let res: restm.IRestResponse<WorkInterfaces.ParentChildWIMap[]>;
res = await this.rest.get<WorkInterfaces.ParentChildWIMap[]>(url, options);
let ret = this.formatResponse(res.result,
null,
true);
resolve(ret);
}
catch (err) {
reject(err);
}
});
}