bulk_update_work_packages
Update multiple work packages in one request by supplying each work_package_id and the fields to change; preview the changes, then confirm to apply them.
Instructions
Update multiple work packages in one call.
Each item's identifier field is work_package_id, not id, e.g.
{"work_package_id": 952, "status": "Closed"}.
Each item in items must contain work_package_id. At least one other field must be present per item.
Optional fields per item: subject, description, type, version, target_versions (a list
of version names/ids for OpenProject's multi-version feature; pass [] to clear all; cannot be
combined with version on the same item; rejected if the item's work package already has more
than one target version assigned), sprint (Backlogs sprint
name/id, requires the Backlogs module and OpenProject 17.3+), project_phase, status,
assignee, responsible, priority, category, custom_fields, parent_work_package_id (or
parent, an alias for the same field, matching update_work_package's naming; do not specify
both on the same item), start_date (YYYY-MM-DD), due_date (YYYY-MM-DD), estimated_time,
remaining_time, duration (ISO8601 duration strings, e.g. 'PT8H' or 'P1D'; pass 'none' to clear
one of these), percentage_done (integer 0-100). Pass 'none' to version, sprint,
project_phase, assignee, responsible, category, parent_work_package_id, or parent to
clear that field on the item, same as update_work_package. An item containing any other key is
rejected with an indexed validation error rather than silently dropping the unrecognized field.
Setting an item's status to a closed status auto-fills percentage_done=100 and remaining_time=PT0H
when that item doesn't supply them explicitly and OpenProject's schema reports those fields as
writable. On an instance using status-based progress calculation, explicitly passing
percentage_done together with a closing status on the same item is rejected with a hard,
indexed validation error (percentageDone is not writable there) rather than silently ignored;
omit percentage_done on that item and let OpenProject derive it instead.
due_date's non-working-day shift, the confirm/preview contract, select's item-trimming
behavior, and cancellation/atomicity semantics all work exactly as documented on
bulk_create_work_packages; only the affected result field differs
(result.result.due_date here too). As there, select names write-result
fields (work_package_id, ready, state, ...), not work package fields:
display_id and the rest come with result, the full written work package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| select | No | Fields to return; a requested unset field comes back as null. Allowed: action, error, index, message, payload, project, ready, result, state, success, validation_errors, work_package_id. | |
| confirm | No | false: preview of every item, nothing changes. true: attempts every item; get the user's approval of the preview first. Failed items are reported per item; items already written are not undone. |