create_work_items
Create between 1 and 50 Polarion work items in a single atomic request, with full validation of enums and custom fields to prevent ghost data.
Instructions
Create one or more Polarion work items (1-50) in one request, same project.
Confirm every enum value (type / status / severity / custom
enums) via list_work_item_enum_options first — unverified ids persist as
ghosts that never match Lucene. custom_fields keys are validated against
the type's existing schema; a key no item of that type uses is rejected,
and a type with no populated customs blocks the write (nothing to validate
against). hyperlinks[].role validated against hyperlink-role.
Atomic: guards + conversion + build run before the POST; one bad item rejects
the whole batch (nothing created). Raises if the returned id count differs
from submitted — re-query list_work_items first.
Items are free-floating; place in a document via move_work_item_to_document
(direct module create lands in the recycle bin). description is
Markdown → sanitized HTML; the post-create round-trip is raw HTML via
get_work_item(include_description_html=True) ↔ update_work_item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Polarion project ID. | |
| items | Yes | One or more work items to create in a single request (1-50). Pass a single-element list to create just one. | |
| dry_run | No | When True, return the payload preview without writing; the enum guard still calls Polarion's getAvailableOptions, so that endpoint must be reachable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| created | Yes | ||
| dry_run | Yes | ||
| work_item_ids | No | ||
| payload_preview | No |