QTM4J: Unlink Test Cases from Requirement
qtm4j_unlink_test_cases_from_requirementUnlink test cases from a Jira requirement using test case keys or filter criteria. Clean up traceability links and manage requirement coverage.
Instructions
Unlink test cases from a Jira requirement in QTM4J by test case keys or filter criteria. Test case keys are resolved to internal IDs automatically.
Toolset: Requirements
Parameters:
requirementKey (string) required: Jira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically.
testCaseKeys (array): Test case keys to unlink (e.g., ['SCRUM-TC-1', 'SCRUM-TC-2']). Resolved to internal IDs and latest versions automatically. Provide this OR filter — not both.
filter (object): Filter criteria to select test cases to unlink. Use instead of testCaseKeys when selecting by criteria. projectId is auto-filled from the active project context.
Output Description: Confirmation with the requirement key and unlinked: true. Warnings included if any test cases could not be resolved or unlinked.
Use Cases: 1. Remove specific test cases from a Jira requirement 2. Unlink test cases matching a filter from a requirement 3. Clean up stale or incorrect test case links on a requirement 4. Remove traceability links as part of sprint cleanup
Examples:
Unlink specific test cases by key
{
"requirementKey": "SCRUM-1",
"testCaseKeys": [
"SCRUM-TC-10",
"SCRUM-TC-11"
]
}Expected Output: Test cases unlinked from requirement SCRUM-1
Unlink test cases matching a filter
{
"requirementKey": "SCRUM-1",
"filter": {
"status": [
"Done"
],
"labels": [
"Deprecated"
]
}
}Expected Output: Filtered test cases unlinked from requirement
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. REQUIREMENT KEY FORMAT: '{PROJECT_KEY}-{number}' — e.g. 'SCRUM-1'. 3. TEST CASE KEY FORMAT: '{PROJECT_KEY}-TC-{number}' — e.g. 'SCRUM-TC-145'. 4. Provide either testCaseKeys or filter — not both. 5. projectId in filter is auto-filled from the active project context — do not set it manually. 6. filter.excludeTestCases can be used to exclude specific test cases when using filter-based unlinking. 7. If a test case key cannot be resolved, it is reported in warnings and other test cases are still unlinked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter criteria to select test cases to unlink. Use instead of testCaseKeys when selecting by criteria. projectId is auto-filled from the active project context. | |
| testCaseKeys | No | Test case keys to unlink (e.g., ['SCRUM-TC-1', 'SCRUM-TC-2']). Resolved to internal IDs and latest versions automatically. Provide this OR filter — not both. | |
| requirementKey | Yes | Jira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| linked | No | ||
| unlinked | No | ||
| requirementKey | Yes |