nulab / backlog-js

Backlog API version 2 client for browser and node.
https://developer.nulab-inc.com/docs/backlog/
33 stars 13 forks source link

Error on postIssue with categoryId #4

Closed Herdubreid closed 3 years ago

Herdubreid commented 5 years ago

When posting the following issue:

{
  categoryId: 22853
  description: "Test 2"
  issueTypeId: 87099
  priorityId: 2
  projectId: 20805
  summary: "Test 2"
}

The following error is returned:

{
  message: "error.unknownParameter : categoryId",
  code: 7,
  moreInfo: ""
}

After removing the categoryId parameter, the issue is successfully posted.

mmktomato commented 3 years ago

Hi. Sorry for late reply. The type of categoryId is Array<number>. https://github.com/nulab/backlog-js/blob/4483f3b436467cf51c5e28ce8a5fa0c00c3666ea/src/option.ts#L345 Try like this:

{
  categoryId: [22853]
}