I’m trying to come up with a JQL query in Jira to find closed user stories that have test cases marked as ‘Passed’ but still have an ‘Unresolved’ resolution. Here’s what I’ve got so far:
issueType = Story AND status = Closed AND issue in linkedIssues('issuetype = "Test Execution" AND status in ("In Progress", Open)', 'relates to')
Then I need to somehow filter for test cases that are passed but unresolved. Any ideas on how to combine these or improve the query? I’m not sure if I’m on the right track. Thanks for any help!
hey zoestar, i think ur close! try adding smthing like ‘AND resolution = Unresolved’ to ur query. that shud catch the unresolved bit. for passed tests, maybe add ‘AND status = Passed’ in the linkedIssues part? not 100% sure but worth a shot. good luck!
I’ve dealt with similar JQL queries before, and here’s what worked for me:
issueType = Story AND status = Closed AND issue in linkedIssues(‘issuetype = “Test Case” AND status = Passed AND resolution = Unresolved’, ‘is tested by’)
This query assumes that your test cases are linked to stories using the ‘is tested by’ relationship. If you’re using a different link type, you’ll need to adjust that part.
One thing to watch out for: make sure your Jira instance actually tracks test case resolution separately from status. Some setups automatically resolve tests when they pass. If that’s the case for you, you might need to look at custom fields or use a different approach entirely.
Also, consider adding a project filter if you’re working across multiple projects. It can help narrow down the results and improve query performance.
Your approach is heading in the right direction, but we can refine it further. Consider modifying your query to:
issueType = Story AND status = Closed AND issue in linkedIssues(‘issuetype = “Test Execution” AND status = Passed AND resolution = Unresolved’, ‘relates to’)
This adjustment should capture closed stories with linked test executions that are marked as passed but remain unresolved. Keep in mind that the exact syntax might vary depending on your Jira configuration and custom fields. You may need to tweak the field names or add project-specific filters. If this doesn’t yield the expected results, I’d recommend consulting your Jira admin for insights into your specific setup.