move_work_item_from_document
Detach a work item from its document, returning it to a free-floating state while preserving all history and attributes.
Instructions
Detach a work item from its document, returning it to free-floating state.
Inverse of move_work_item_to_document. Calls the
moveFromDocument action endpoint, which clears the work item's
module relationship and removes the corresponding document part.
This is the ONLY supported detach path because Polarion rejects PATCH
attempts on the module relationship.
The work item resource itself is preserved (with all history, links,
and attributes) and reappears as a free-floating work item visible to
list_work_items but not to any document. To re-attach, call
move_work_item_to_document.
Calling this on a work item that is already free-floating returns
HTTP 400, surfaced here as RuntimeError — not idempotent.
Heading-type work items CAN be detached; the heading becomes a
free-floating work item with space_id="" and outline_number=""
(orphan-like state, but the work item is intact).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project containing the work item. | |
| work_item_id | Yes | Short ID of an EXISTING work item (e.g. 'MCPT-042'). | |
| dry_run | No | When True, return payload preview without calling Polarion. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| moved | Yes | True on a real move; False on dry-run. | |
| dry_run | Yes | Whether this was a dry-run. | |
| payload_preview | Yes | Request payload sent or previewed; None after real ops. |