Jira环境下Xray测试管理:通过CSV测试导入器关联需求后状态未更新的问题咨询
Great question—let’s break this down clearly. First off, this does look like a bug or at least an inconsistent behavior in Xray’s CSV importer. Here’s why: when you manually link user stories to test cases, Xray correctly updates the requirement state to Not Run, but the same action via CSV import doesn’t trigger that state change. That’s a clear discrepancy in expected behavior, since the end result (linking coverage) should be the same regardless of the method used.
Let’s walk through the most likely fixes to get this working:
1. Double-Check Your CSV Coverage Mapping
First, make sure your Map of coverage is formatted exactly as Xray expects. A common mistake here is typos or incorrect formatting that causes the importer to create the link but not trigger the state update. Your mapping should look like this:
Map of coverage: - Issue Key: US-456, Type: User Story
- Replace
US-456with your actual user story issue key. - Ensure
Typematches the exact issue type in your Jira instance (e.g., if your stories are labeled "Story" instead of "User Story", use that).
2. Force a Coverage Sync After Import
Sometimes the CSV importer creates the coverage link but doesn’t fire the state update event automatically. Try manually triggering a sync:
- After importing your test cases via CSV, go to the Xray Test Repository or the specific test case view.
- Look for an option like "Sync Coverage" or "Refresh Requirements Status" (the exact label depends on your Xray version).
- Run this sync, and check if your user story’s state updates to
Not Run.
3. Update Your Jira Automation Rules (If Used)
If you’re relying on Jira Automation to update requirement states based on test coverage, make sure your rule is set to trigger on all link creation events—not just manual ones. The CSV importer might be creating the link via a system event that your automation isn’t listening for:
- Go to Jira > Project Settings > Automation.
- Find the rule that updates your requirement states.
- Under the Trigger section, add or confirm that "Issue linked" is selected as a trigger event.
- Save the rule and test another CSV import.
4. Report the Inconsistency to Xray Support
If none of the above fixes work, this is definitely a bug that needs to be addressed by the Xray team. When you reach out, include:
- Your exact Xray and Jira versions.
- A sanitized copy of your CSV file (remove any sensitive data).
- Screenshots showing the manual vs CSV import results.
- Step-by-step instructions to reproduce the issue.
内容的提问来源于stack exchange,提问作者Seif

