Requirements traceability in Jira: links, JQL and a matrix

What requirements traceability means in Jira, a small traceability matrix, how to build one with link types, JQL and a dashboard, and where that stops.

Requirements traceability means you can start from any requirement and find the tests that check it, how they last ran and the defects they found, then go the other way, from a failed test or a bug back to the requirement it puts at risk. Jira can hold that chain with work item links and search it with JQL. What it can’t do on its own is show the whole chain in one view, or keep a record of test results.

This guide explains what to trace, shows a small traceability matrix, sets up the native version step by step, and says where it stops.

What traceability means in practice

The chain has four parts:

  1. Requirement: the story or requirement work item that says what the product must do.
  2. Test: the test case that checks it.
  3. Run: each time the test is executed, with a result of passed, failed, blocked or not run.
  4. Defect: the bug a failed run turned up.

With the chain in place you can answer the questions that come up around every release:

  • Is every requirement in this release tested, and did those tests pass?
  • A test just failed. Which requirement is at risk?
  • A bug came in. Which test should have caught it?
  • An auditor asks for proof that each requirement was verified. Where is it?

How to build a requirement traceability matrix in Jira is a long-running Community question, and its accepted answer is a table kept by hand in Confluence. You can get further than that with Jira alone.

A small traceability matrix

Here are the checkout requirements for release 2.4 of a web shop:

Requirement Test case Latest result Defect
SHOP-110 Guest checkout QA-21 Guest pays with a card Passed
SHOP-110 Guest checkout QA-22 Declined card keeps the cart Failed SHOP-188 Cart empties after a declined card
SHOP-111 Saved cards QA-23 Pay with a saved card Passed
SHOP-112 Discount codes QA-24 Discount code reduces the total Not run
SHOP-113 Address validation None

Reading it one requirement at a time:

  • SHOP-110 is covered but failing: one of its two tests failed, and the bug it found is open.
  • SHOP-112 is covered on paper, but its test hasn’t run in this release, so nobody knows whether it works.
  • SHOP-113 has no test at all. That’s the gap the matrix exists to show.

A Jira admin goes to Settings > Work items > Work item linking and adds a link type named Tests, with the outward description “tests” and the inward description “is tested by”. The built-in “relates to” would work, but it has no direction, and so much other work uses it that searches can’t tell a test from a related task. Atlassian covers the screen in configure work item linking.

On the test case, select Add under the summary, then Linked work item. Choose tests, pick the requirement and select Link. Do it when you write the test; links added later are where gaps creep in.

When a test fails, raise the bug from the test with Create linked work item, then link the same bug to the requirement it breaks. Use “relates to” for both links, so bugs stay out of your coverage searches.

3. Search the chain with JQL

The tests for one requirement:

issue in linkedIssues(SHOP-110, "is tested by")

Requirements in the release that have at least one test:

project = SHOP AND type = Story AND fixVersion = "2.4" AND issueLinkType = "is tested by"

Requirements in the release with no test:

project = SHOP AND type = Story AND fixVersion = "2.4" AND (issueLinkType is EMPTY OR issueLinkType != "is tested by")

The is EMPTY part matters. On its own, issueLinkType != "is tested by" only returns stories that have some other link, and skips stories with no links at all, which are often the untested ones. Atlassian’s JQL reference lists is EMPTY as unsupported for this field, but the search works in Jira Cloud.

Open bugs raised from one test:

issue in linkedIssues(QA-22, "relates to") AND type = Bug AND statusCategory != Done

linkedIssues() takes one work item key and, optionally, the link description as seen from that work item, which is why the first search uses “is tested by” from the story’s side.

4. Record the latest result

Jira has no field for a test result, so add one: a dropdown called Last result, with the options Passed, Failed, Blocked and Not run, on the Test work type. Testers set it after each run. A field on the test holds only the latest result. To keep every run, record runs as sub-tasks, and use this field only for the matrix.

Mark the tests that run in a release, with Fix versions if they live in the same space as the stories, or a label such as release-2.4 if they don’t, and save type = Test AND labels = release-2.4 as the release’s tests. At the start of a release, set every test in it back to Not run with a bulk change, so old results don’t pass for new ones.

5. Put it on a dashboard

Save each search as a filter, then create a dashboard and add gadgets:

  • Filter Results on the “no test” filter: the gaps, one row per requirement.
  • Pie Chart on a filter of the release’s tests, with Last result as the statistic type: how many passed, failed, are blocked or haven’t run.
  • Two Dimensional Filter Statistics on the same filter, with Component on one axis and Last result on the other: which product areas are failing.
  • Filter Results on the release’s open bugs.

What the native setup can’t show

  • The chain in one view. linkedIssues() takes one key at a time, so no single search lists every requirement next to its tests. A full matrix means one search per requirement, or two exports and a spreadsheet.
  • Coverage as a number. You get two counts from two searches and divide them yourself.
  • A result you can trust. Last result is whatever someone set last. It isn’t tied to a run, it keeps no history across releases, and a result from three months ago looks as fresh as this morning’s.
  • Covered versus passing. The “at least one test” search counts a requirement whose only test failed as covered.
  • Links pointing the wrong way. Pick “is tested by” instead of “tests” on a test case and the link runs backward. The searches quietly miss it.

Coverage and traceability with Advanced Test Management

Advanced Test Management for Jira reads coverage and results from its own Test Cases and runs, so nobody has to type a result into a field:

  • You choose what counts as a requirement. Under requirement sources, pick the work types, such as Story and Bug, that coverage and traceability use.
  • One link means covered. A Test Case covers a requirement through the app’s Covers link, which Covers requirement sets when you create the case.
  • The Coverage tab lists every requirement with its number of covering tests and a verdict: uncovered when no case is linked, failing when a linked case last ran as a fail, and covered otherwise. Chips at the top count the whole space.
  • The Traceability tab has one row per link, from requirement to Test Case to that case’s most recent execution result, with the bugs raised against the test. In a team-managed space, coverage and the links work the same, but the failing verdict and latest results need company-managed fields.
  • Reports and a gadget. The Coverage gaps report separates uncovered requirements from covered ones whose tests are failing, and names the failing case. Coverage by grouping rolls coverage up by component. The app’s dashboard gadget can show either one.

The docs cover both tabs in coverage and traceability.

Keep the matrix honest

  • Link as you write. A test without a requirement link is invisible to every coverage search.
  • Test the story, not the epic. One link to an epic makes coverage look complete while its stories have no tests.
  • Review gaps before each release, starting with the highest-priority requirements, not the night before an audit.
  • Ask two questions, not one. “Is it tested?” and “Did the tests pass in this release?” have different answers more often than you’d expect.
  • Use one link type for tests. Mixing “tests” with “relates to” splits your coverage across two searches.

Questions

What’s the difference between coverage and traceability?

Coverage asks whether each requirement has at least one test. Traceability follows the whole chain, from requirement to test to its latest result and any defect, in both directions.

Can Jira export a traceability matrix?

Not as one table. You can export two searches to CSV, the release’s requirements and the release’s tests, and join them in a spreadsheet, but the result is a snapshot that ages from the moment you save it.

Should a test link to the story or to the epic?

To the work item whose acceptance criteria it checks, which is usually the story. Links to epics make coverage look complete while individual stories have no test at all.

Do I need Confluence for a traceability matrix?

No. A Confluence page can hold a hand-built table with live lists of Jira work items, but the links and searches that make up the matrix all live in Jira.

Try Advanced Test Management for Jira

Write, organize and run your tests in Jira, right next to the work items they verify. Link every test case to its requirement, record every run, and see what’s covered and what’s failing at a glance.