Here’s a complete solution for managing test cycles during release cloning:
Understanding Fix Version-Based Test Cycles: Xray organizes test executions into cycles that are typically aligned with fix versions or sprints. When you clone a story from one release to another, Jira copies all issue links including those to Test and Test Execution issues. However, the Test Execution records still reference the original cycle (e.g., “v2.5 Regression”), creating confusion about which tests have actually been run for the new release.
Cloning Patterns for Release Preparation: Establish a standard cloning workflow:
- Clone the story/bug and update the fix version to the target release (e.g., 2.5 → 2.6)
- Preserve links to Test issues (these define what needs testing)
- Remove links to Test Execution issues (these represent historical results)
- Add the cloned story to a new test cycle for the target release
Preserving Test Coverage While Resetting Results: Use automation to handle the link cleanup after cloning:
Trigger: Issue Cloned (or Issue Created with specific label/field)
Condition: Issue Type in (Story, Bug) AND Fix Version changed
Action: For each linked issue where type = "Test Execution"
→ Delete link between current issue and Test Execution
Action: Add comment "Test executions from previous release removed. Please re-execute tests in {{issue.fixVersions.first}} cycle."
This automation preserves the “tests” links to Test issues (defining coverage requirements) while removing “is tested by” links to Test Execution records (historical results). QA can see which tests apply but won’t see stale pass/fail status.
Automation to Relink Tests After Clone: Create a follow-up automation that adds cloned stories to the appropriate test cycle:
Trigger: Issue Updated (Fix Version field changed)
Condition: Fix Version is not EMPTY AND Test Execution links removed
Action: Find or create Test Plan for {{issue.fixVersions.first}}
Action: Add current issue to Test Plan
Action: Trigger test execution creation (via Xray REST API or manual QA workflow)
Alternatively, use a scheduled rule that runs daily to identify newly cloned stories and batch-add them to the current release’s test plan.
Release Board Reporting Expectations: Update your release board filters to accurately reflect test status:
JQL: fixVersion = "2.6" AND
issueFunction in linkedIssuesOf("project = TEST AND
issuetype = 'Test Execution' AND
'Test Cycle' = 'v2.6 Regression'", "is tested by")
This filter only shows stories with test executions in the correct cycle, preventing false positives from cloned issues. Add a separate filter for “Needs Retesting” to identify cloned stories without current-cycle executions:
JQL: fixVersion = "2.6" AND
issueFunction in linkedIssuesOf("issuetype = Test", "tests") AND
NOT issueFunction in linkedIssuesOf("issuetype = 'Test Execution' AND
'Test Cycle' = 'v2.6 Regression'", "is tested by")
Additional Recommendations:
- Use a custom field “Target Test Cycle” on stories to explicitly track which cycle should test them
- Configure Xray’s test plan to automatically include issues by fix version
- Train release managers to verify test status after cloning using the “Needs Retesting” filter
- Consider using Xray’s test plan cloning feature instead of story cloning for better test cycle alignment
This approach ensures cloned stories maintain test coverage definitions while resetting execution history, giving QA accurate visibility into what needs retesting for each release.