update_work_package
Change OpenProject work package details—status, assignee, dates, time, version, parent, or custom fields—with validation and preview confirmation before applying.
Instructions
Update a work package.
The tool validates the patch first. assignee: 'me' or numeric user id (e.g., 42). Call list_users to find ids. parent re-parents the work package (numeric id or a PROJ-123 reference); pass 'none' to remove the parent and make it top-level. version accepts a version name/id, or 'none' to unassign the version. sprint accepts a Backlogs sprint name/id (requires the Backlogs module and OpenProject 17.3+), or 'none' to unassign it. Pass 'none' to assignee, responsible, category or project_phase to unassign that field. Omitted fields stay unchanged. target_versions accepts a list of version names/ids to assign multiple target versions at once (OpenProject's multi-version feature); pass [] to clear all. target_versions and version write the same underlying data and cannot be used together in one call. If this work package already has more than one target version, version alone is rejected; use target_versions instead. A change of version, target_versions, sprint or a version custom field is refused while the work package holds such an assignment in a project OPENPROJECT_READ_PROJECTS does not cover, because the change would remove it. estimated_time, remaining_time, duration accept ISO8601 duration strings (e.g., 'PT8H' for 8 hours, 'PT1H30M' for 1.5 hours, 'P1D' for 1 day); omit to leave unchanged, or pass 'none' to clear the field. percentage_done is an integer 0-100. Setting status to a closed status auto-fills percentage_done=100 and remaining_time=PT0H when you don't supply them explicitly and OpenProject's schema reports those fields as writable (on instances using status-based progress calculation, OpenProject already derives them itself and this is skipped). On such an instance, explicitly passing percentage_done together with a closing status is rejected with a hard validation error (percentageDone is not writable there) rather than silently ignored; omit percentage_done and let OpenProject derive it instead. due_date's non-working-day shift and the confirm/preview contract work exactly as documented on create_work_package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| parent | No | ||
| sprint | No | ||
| status | No | ||
| confirm | No | false: preview only, nothing changes. true: applies it; get the user's approval of the preview first. | |
| subject | No | ||
| version | No | ||
| assignee | No | ||
| category | No | ||
| due_date | No | ||
| duration | No | ||
| priority | No | ||
| start_date | No | ||
| description | No | ||
| responsible | No | ||
| custom_fields | No | ||
| project_phase | No | ||
| estimated_time | No | ||
| remaining_time | No | ||
| percentage_done | No | ||
| target_versions | No | ||
| work_package_id | Yes | Work package id (e.g. 952) or display id (e.g. "PROJ-51"), not the bare number 51. |