QTM4J: Unlink Requirements from Test Case
qtm4j_unlink_requirements_from_test_caseUnlink specific or all Jira requirements from a test case in QTM4J by providing requirement keys or setting a flag to remove all links.
Instructions
Unlink one or more Jira requirements from a test case in QTM4J by requirement keys, or unlink all requirements at once with unLinkAll.
Toolset: Test Cases
Parameters:
key (string) required: Test case key in '{PROJECT_KEY}-TC-{number}' format (e.g., 'SCRUM-TC-145'). Required.
versionNo (number): Test case version number. Defaults to the latest version.
requirementKeys (array): List of requirement keys to unlink (e.g., ['SCRUM-1', 'SCRUM-2']). Ignored when unLinkAll is true.
unLinkAll (boolean): If true, all linked requirements are unlinked from this test case. Ignores requirementKeys when set.
Output Description: Confirmation with the test case key, version number, and unlinked: true. Warnings are included if any requirements could not be resolved or unlinked.
Use Cases: 1. Remove specific requirements from a test case 2. Unlink all requirements from a test case at once 3. Clean up stale or incorrect requirement links from a test case 4. Remove requirement associations from a specific test case version
Examples:
Unlink specific requirements by key
{
"key": "SCRUM-TC-145",
"requirementKeys": [
"SCRUM-1",
"SCRUM-2"
]
}Expected Output: Requirements SCRUM-1 and SCRUM-2 unlinked from test case
Unlink all requirements from a test case
{
"key": "SCRUM-TC-145",
"unLinkAll": true
}Expected Output: All requirements unlinked from test case
Unlink a requirement from a specific version
{
"key": "SCRUM-TC-85",
"versionNo": 2,
"requirementKeys": [
"SCRUM-10"
]
}Expected Output: Requirement unlinked from version 2 of test case
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. KEY FORMAT: '{PROJECT_KEY}-TC-{number}' — e.g. 'SCRUM-TC-145'. 3. Requirement keys follow the Jira issue key format: '{PROJECT_KEY}-{number}' (e.g. 'SCRUM-1'). 4. Set unLinkAll to true to remove all requirements in one call — no need to list them individually. 5. If a requirement key cannot be resolved or unlinked, it is reported in warnings and others are still unlinked. 6. versionNo defaults to the latest version. Use search_test_cases to find available versions if needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Test case key in '{PROJECT_KEY}-TC-{number}' format (e.g., 'SCRUM-TC-145'). Required. | |
| unLinkAll | No | If true, all linked requirements are unlinked from this test case. Ignores requirementKeys when set. | |
| versionNo | No | Test case version number. Defaults to the latest version. | |
| requirementKeys | No | List of requirement keys to unlink (e.g., ['SCRUM-1', 'SCRUM-2']). Ignored when unLinkAll is true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| unlinked | Yes | ||
| versionNo | Yes |