create_work_item_links
Create outgoing links from a source work item to target work items in Polarion. Supports batch creation of 1-50 links with role, revision, and suspect settings, ensuring atomic validation and rollback on errors.
Instructions
Create 1-50 outgoing links from one source work item, atomically.
Role and target existence validated before POST — invalid ones raise ValueError. Per spec: target_project_id defaults to source, revision pins (else HEAD), suspect flags re-review. A 4xx (e.g. duplicate role+target → 409) rolls back the whole batch — re-query list_work_item_links before retrying. link_ids are the delete-path ids, input order.
Phantom success: when the source sits in a document, move_work_item_to_document already auto-created one heading link; a NEW same-role link 201s but is NOT persisted — verify with list_work_item_links.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | Yes | Links to create under the source work item (1-50). | |
| dry_run | No | Preview payload without writing; guards still query Polarion. | |
| project_id | Yes | Source work item's project ID. | |
| work_item_id | Yes | Source work item ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| created | Yes | ||
| dry_run | Yes | ||
| link_ids | No | ||
| payload_preview | No |