QTM4J: Get Linked Bugs of Test Case Execution
qtm4j_get_linked_bugs_of_test_case_executionRetrieve Jira bugs linked to a test case execution by providing a test cycle key and test case key, with optional filtering by priority and status to focus on the most relevant issues.
Instructions
Retrieve Jira bugs linked to a test case execution with optional priority and status filtering. Looks up testCaseExecutionId from testCycleKey and testCaseKey; resolves filter names to numeric IDs.
Toolset: Test Executions
Parameters:
testCycleKey (string) required: Test cycle key in the format '{PROJECT_KEY}-TR-{number}', e.g. 'SCRUM-TR-101'. Used directly as the API path parameter.
testCaseKey (string) required: Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'.
filter (object): Filter criteria for linked bugs. Omit to return all linked bugs. priority and status names are resolved to numeric IDs; unresolvable names are skipped with a warning.
level (string): Execution level filter. Default: 'testcase_execution, teststep_execution' (both levels). Use 'testcase_execution' for test-case-level links only, 'teststep_execution' for step-level links only. (default: "testcase_execution, teststep_execution")
startAt (number): Zero-based index of the first result to return (pagination offset). (default: 0)
maxResults (number): Maximum number of bugs to return per page. Range 1–100; defaults to 20. (default: 20)
Output Description: JSON object with startAt, maxResults, total, and data array of linked bug objects. Each bug has: id, key, summary, status, priority, issueType, level, stepSeqNo, parameterGroup.
Use Cases: 1. List all Jira bugs linked to a test case execution 2. Filter linked bugs by priority or status
Examples:
Get all linked bugs for a test case execution
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42"
}Expected Output: Paginated list of all bugs linked to the test case execution
Filter by priority
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"filter": {
"priority": [
"High"
]
}
}Expected Output: Linked bugs with High priority
Filter by status
{
"testCycleKey": "PROJ-TR-101",
"testCaseKey": "PROJ-TC-42",
"filter": {
"status": [
"To Do",
"In Progress"
]
}
}Expected Output: Linked bugs in To Do or In Progress status
Hints: 1. Call set_project_context before this tool. 2. An empty result (total = 0) means no bugs are linked — it is not an error. 3. priority and status names are resolved to numeric IDs; unresolved names are skipped with a warning. 4. Use get_linked_bugs_of_test_step_execution to retrieve bugs linked at a specific step level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | Execution level filter. Default: 'testcase_execution, teststep_execution' (both levels). Use 'testcase_execution' for test-case-level links only, 'teststep_execution' for step-level links only. | testcase_execution, teststep_execution |
| filter | No | Filter criteria for linked bugs. Omit to return all linked bugs. priority and status names are resolved to numeric IDs; unresolvable names are skipped with a warning. | |
| startAt | No | Zero-based index of the first result to return (pagination offset). | |
| maxResults | No | Maximum number of bugs to return per page. Range 1–100; defaults to 20. | |
| testCaseKey | Yes | Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. | |
| testCycleKey | Yes | Test cycle key in the format '{PROJECT_KEY}-TR-{number}', e.g. 'SCRUM-TR-101'. Used directly as the API path parameter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Linked bugs on the current page; empty when total is 0. | |
| total | Yes | Total number of linked bugs matching the filter across all pages. 0 means none are linked. | |
| startAt | Yes | Zero-based index of the first item in this page. | |
| maxResults | Yes | Page size applied to this response. |