move_work_item_to_document
Move an existing work item into a document at a chosen position: after a part, before a part, or appended. Relocates instead of copying and auto-links to the enclosing heading.
Instructions
Move an existing work item into a document at a given position.
THE attach path: atomically sets module and inserts a part. Headings are rejected — add headings via update_document . An item already in a document is moved, not copied.
At most one of previous_part_id (AFTER) / next_part_id (BEFORE); omit both to append. Part ids from read_document_parts.
Auto-creates one link to the enclosing heading; a later same-role create_work_item_links reports created but is NOT persisted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview payload without calling Polarion. | |
| project_id | Yes | Polarion project ID. | |
| next_part_id | No | Insert BEFORE this part ID; exclusive with previous_part_id. | |
| work_item_id | Yes | Work item ID (e.g. 'MCPT-042'). | |
| target_space_id | Yes | Target space ID ('_default' = default space). | |
| previous_part_id | No | Insert AFTER this part ID; exclusive with next_part_id. | |
| target_document_name | Yes | Target document name within target_space_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| moved | Yes | ||
| dry_run | Yes | ||
| payload_preview | Yes |