Node version: 16.14
Npm version: 8.2.1
OS and version: Mac OS
azure-devops-node-api version: 11.1.1
Issue Description
When attempting to create a new work item, I receive a NULL response.
Expected behaviour
Response would include the new work item data OR some exception would be caught and logged.
Actual behaviour
NULL response is returned and no exception is caught.
Steps to reproduce
See my code below:
//Initialize Work API client
let authHandler = azdev.getPersonalAccessTokenHandler(context.oAuthData.access_token);
let devOpsClient = new azdev.WebApi(context.settings.orgUrl, authHandler);
let workItems: wia.IWorkItemTrackingApi = await devOpsClient.getWorkItemTrackingApi();
let document: JsonPatchDocument = [];
params.fields.forEach(e => {
(document as any[]).push(
{
op: 'add',
path: `/fields/System.${e.field}`,
from: null,
value: e.value
}
)
});
let newItem: wii.WorkItem[] = await workItems.createWorkItem(
null,
document,
params.projectNameId,
params.type)
.catch(err => {
throw new Error(`${err}`)
});
console.log({newItem})
return { 'New Work Item': newItem };
I'm attempting a very basic Issue type work item creation with the following document structure. I've also tried adding additional fields for all the fields that appear to be populated in the UX by default in case that was causing the issue:
Environment
Node version: 16.14 Npm version: 8.2.1 OS and version: Mac OS azure-devops-node-api version: 11.1.1
Issue Description
When attempting to create a new work item, I receive a NULL response.
Expected behaviour
Response would include the new work item data OR some exception would be caught and logged.
Actual behaviour
NULL response is returned and no exception is caught.
Steps to reproduce
See my code below:
I'm attempting a very basic Issue type work item creation with the following document structure. I've also tried adding additional fields for all the fields that appear to be populated in the UX by default in case that was causing the issue:
I'm still relatively new to working with this SDK, so any guidance is very much appreciated!