[POST] .../v1/projecttask/setproject
Moves a task to another project Use this method to move a task to another accessible project without recreating the task. The method changes project_id, revalidates hierarchy constraints in the persistent layer, emits task update side effects 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 persistent errors are returned as HTTP 200 ErrorResult business errors.
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
}
}