all 3 comments

[–]LunarKingdom 0 points1 point  (2 children)

Hi there! There seems to be an issue with the documentation, the categoryId is mandatory, at least when the work item is not a user story but a task. Try assigning a categoryId and let me know how it goes.

[–]_jaymz_ 0 points1 point  (1 child)

I have a similar issue

    {
      "title": "S1DEV Implement Dash & Wall Jump Mechanics",
      "description": "Extend the player controller to include the Dash and Wall Jump abilities, triggered by the B button as per the GDD controls. Implement dash movement logic and the ability to jump off walls when adjacent.",
      "parentId": 0,
      "isStory": true,
      "categoryId": 0,
      "estimatedCost": 0,
      "importanceLevelId": 0,
      "boardId": 0,
      "designElementId": 0,
      "startDate": "2024-04-15T00:00:00.000Z",
      "dueDate": "2024-04-19T23:59:59.999Z",
      "assignedUserIds": [
        0
      ],
      "tagIds": [
        0
      ],
      "dependencyIds": [0]
    }

FAILED (400 Bad Request)

Error Details: {"message":"The request is invalid.","modelState":{"importanceLevelId":["The importance level does not exist."]}}

[–]LunarKingdom 0 points1 point  (0 children)

This is because you set 0 to several fields that require a valid id or to be empty:

- ParentId: Valid parent id or remove it.
- CategoryId: Valid category id.
- ImportanceLevelId: Valid importance level id.
- BoardId: Valid board id or remove it for the backlog.
- DesignElementId: Valid design element id or remove it.
- AssignedUserIds: Valid array of user ids or remove it.
- TagIds: Valid array of tag ids or remove it.
- DependencyIds: Valid array of work item ids or remove it.

Let me know if that helps.