SetProject

[POST] .../v1/projecttask/setproject

Moves a task to another project. Move a task to another accessible project without recreating the task. The method changes project_id, revalidates hierarchy constraints and returns UpdateResult. The request body must contain id and target project_id, the caller needs task project-change permission and invalid ids, denied access, missing task or project, parent hierarchy conflicts or storage errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
id Int64 Required Task ID.
project_id Int64 Required Target project ID.

Request Example

{
  "id": 101,
  "project_id": 11
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}