qase_defect_upsert
Create or update a tracked testing defect in Qase. New defects require title, actual_result, and severity; include an existing id to update or resolve it.
Instructions
Create or update a defect — a tracked problem found by testing. Without id it creates, with id it updates. Creating one requires title, actual_result and severity; the API rejects a defect missing any of the three. Severity is given as a label ("blocker", "critical", "major", "normal", "minor", "trivial") and the server maps it to the workspace's numeric ID, custom options included. Status is a label too ("open", "in_progress", "resolved", "invalid") and passes through as written; setting it to "resolved" on an existing defect goes through the dedicated resolve endpoint. When the defect comes from a specific test failure, use qase_triage_defect instead. The API has no way to attach runs or results to a defect, so reference the failing results in the text rather than expecting a link. Find existing defects with qql_search before filing a duplicate. Cost: one API call, about 0.5s, plus a cached lookup of the severity options.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Defect ID — if provided, updates; if omitted, creates | |
| code | Yes | Project code (2-10 uppercase letters, numbers, or underscores) | |
| tags | No | ||
| title | Yes | Defect title | |
| status | No | Set to "resolved" to resolve the defect | |
| severity | No | ||
| attachments | No | Attachment hashes from qase_attachment_upload | |
| custom_field | No | ||
| actual_result | No |