QTM4J: Link Requirements to Test Cycle
qtm4j_link_requirements_to_test_cycleLink Jira requirements to a QTM4J test cycle using requirement keys or a JQL filter to build traceability.
Instructions
Link one or more Jira requirements to a QTM4J test cycle by requirement keys or JQL filter. Requirement keys are resolved to internal IDs automatically.
Toolset: Test Cycles
Parameters:
cycleKey (string) required: Test cycle key in '{PROJECT_KEY}-TR-{id}' format (e.g., 'SCRUM-TR-1'). Resolved to the internal cycle UID automatically.
requirementKeys (array): List of Jira requirement keys to link (e.g., ['SCRUM-1', 'SCRUM-2']). Resolved to internal IDs automatically. Provide this OR filter.jql — not both.
filter (object): JQL filter to select requirements to link. Use instead of requirementKeys when filtering by JQL.
Output Description: Confirmation with the cycle key and linked: true. Warnings are included if any requirements could not be resolved or linked.
Use Cases: 1. Link one or more Jira requirements (stories, bugs, epics) to a test cycle 2. Associate requirements with a test cycle using a JQL filter 3. Build traceability between requirements and a test cycle 4. Link all stories from a sprint to a test cycle using JQL
Examples:
Link two requirements by key
{
"cycleKey": "SCRUM-TR-1",
"requirementKeys": [
"SCRUM-1",
"SCRUM-2"
]
}Expected Output: Requirements SCRUM-1 and SCRUM-2 linked to test cycle
Link requirements by JQL filter
{
"cycleKey": "SCRUM-TR-1",
"filter": {
"jql": "project = DEMO AND issuetype = Story"
}
}Expected Output: Requirements matched by JQL linked to test cycle
Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. CYCLE KEY FORMAT: '{PROJECT_KEY}-TR-{id}' — e.g. 'SCRUM-TR-1'. Resolved to internal UID automatically. 3. Requirement keys follow Jira issue key format: '{PROJECT_KEY}-{number}' (e.g. 'SCRUM-1'). 4. Provide either requirementKeys or filter.jql — not both. 5. If a requirement key cannot be resolved or linked, it is reported in warnings and other requirements are still linked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | JQL filter to select requirements to link. Use instead of requirementKeys when filtering by JQL. | |
| cycleKey | Yes | Test cycle key in '{PROJECT_KEY}-TR-{id}' format (e.g., 'SCRUM-TR-1'). Resolved to the internal cycle UID automatically. | |
| requirementKeys | No | List of Jira requirement keys to link (e.g., ['SCRUM-1', 'SCRUM-2']). Resolved to internal IDs automatically. Provide this OR filter.jql — not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| linked | Yes | ||
| cycleKey | Yes |