Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Linking requirements, test cases, and user stories

Dan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2026

Hi there - I'm a complete noob at Jira so forgive me. Currently we have a large number of requirements, test cases, and user stories. The general cascade is:
Requirements -> User stories -> Test cases - User stories are linked to requirements. Test cases are linked to user stories. But, we need to link requirements to test cases in bulk... Is there a way to use the indirect link via the User Stories to ink all requirements for each user story to each test case that's linked to that user story?

1 answer

0 votes
Trudy Claspill
Community Champion
January 19, 2026

Hello @Dan 

Welcome to the Atlassian community.

Which Jira product are you using; Data Center or Cloud?

Are Requirements and Test Cases types of issues/work items?

Has the native item linking feature been used to link Requirements to User Stories and User Stores to Test Cases? Or, if you are using Jira Cloud, have you modified the parent/child Work Item Hierarchy structure to create these relationships?

Are all of these items in the same Project (aka Space) or are they in different Spaces?

What is your level of access? Are you a Project/Space Administrator for the Spaces where the items are located? Are you a Jira App Admin?

How many items are dealing with? How many Requirements, how many User Stories, and how many Test Cases?

Do you have access to any third party apps that extend the capabilities of JQL filters such as Adaptavist ScriptRunner or JQL Tricks for Jira?

It is possible to create the links you want through Automation Rules, but the answers to the above questions are required to provide guidance on the methodology to use.

Dan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2026

Which Jira product are you using; Data Center or Cloud?

I believe it's Jira Cloud

Are Requirements and Test Cases types of issues/work items?

Yes

Has the native item linking feature been used to link Requirements to User Stories and User Stores to Test Cases? Or, if you are using Jira Cloud, have you modified the parent/child Work Item Hierarchy structure to create these relationships?

This is native item linking. We aren't using the parent/child heirarchy.

Are all of these items in the same Project (aka Space) or are they in different Spaces?

Same space

What is your level of access? Are you a Project/Space Administrator for the Spaces where the items are located? Are you a Jira App Admin?

I'm not sure my permissions completely, but let's assume I'm admin since I can get that easily.

How many items are dealing with? How many Requirements, how many User Stories, and how many Test Cases?

Several hundred for both Requirements and User Stories. Probably between 100 - 200 Test Cases.

Do you have access to any third party apps that extend the capabilities of JQL filters such as Adaptavist ScriptRunner or JQL Tricks for Jira?

I have a lot of options listed when I go to "Add Condition"... I see JQL on there, so I assume I can use that?

It is possible to create the links you want through Automation Rules, but the answers to the above questions are required to provide guidance on the methodology to use.

Hopefully that gives you what you need...?

Trudy Claspill
Community Champion
January 19, 2026

Thank you for that additional information.

Before we go further down this path let us back up a moment.

What problem are you trying to solve by linking Requirements to Test Cases? If we understand the underlying problem you are trying to solve, that might lead to a different recommendation for a solution.

 

-----

Getting back to your situation there are more elements that we need to explore.

Let us verify you have the necessary access to create an Automation Rule.

Can you access the Space Settings for the Space, and then the Automation option? From there do you have access to Create Rule?

When I asked about third party apps I meant apps that add functionality to the Search Work Items feature where you create JQL statements to retrieve work items. With such apps you may be able to construct nested filters that would make it easier to retrieve the list of Test Cases linked to the User Stories linked to a given Requirement. If you have ScriptRunner, for example, in the Apps list in the navigation panel you would see "Enhanced Search".

You mentioned Requirements, User Stories, and Test Case counts in the hundreds. For a given Requirement, what is the range on the number of User Stories typically linked? And for a User Story, what is the range on the number of Test Cases typically linked?

Do you typically have one User Story linked to only one Requirement, or are there User Stories linked to multiple requirements? Same question with regard to Test Cases linked to User Stories.

 

You talked about the need to do this linking in bulk. Does that mean you want to do that now for existing Requirements, User Stories, and Test Cases? What about going forward?

  1. If you add new Requirements, User Stories, and Test Cases do you want the links between Requirements and Test Cases to be created immediately?
  2. What would you want to happen if links between Requirements and User Stories change, or between User Stories and Test Cases?
    1. A User Story linked to a Requirement might be unlinked. Should the Test Cases linked to the User Story automatically be unlinked from the Requirement?
    2. A Test Case linked to a User Story might be unlinked. Should the Test Cases automatically be unlinked from the Requirement to which the User Story was linked?
    3. If you allow Test Cases to be linked to multiple User Stories, and User Stories to be linked to multiple Requirements, that would complicate this scenario as the unlinked item could be linked through another connection.
Dan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2026

Thank you for that additional information.

Before we go further down this path let us back up a moment.

What problem are you trying to solve by linking Requirements to Test Cases? If we understand the underlying problem you are trying to solve, that might lead to a different recommendation for a solution.

This is a traceability problem. We need to show the full linkage from Requirement, to Epics and User Stories, to Test Case. Right now we use the RTM Reports function to generate a table/graphic to depict all of this for the customer. 

We're trying to solve this problem as it was created accidentally... At first we thought we would not need to show the Test Case linked to Requirement and that linkage to User Story would suffice and the indirect link of User Story to Test Case would show the full path... But that doesn't seem to be the case, so we have to directly link all Requirements to Test Cases (at least, I believe that's true, unless you know another way to show that without changing all the linkages on every Test Case [wether manually OR automated])

-----

Getting back to your situation there are more elements that we need to explore.

Let us verify you have the necessary access to create an Automation Rule.

Can you access the Space Settings for the Space, and then the Automation option? From there do you have access to Create Rule?

Yes I can create automations.

When I asked about third party apps I meant apps that add functionality to the Search Work Items feature where you create JQL statements to retrieve work items. With such apps you may be able to construct nested filters that would make it easier to retrieve the list of Test Cases linked to the User Stories linked to a given Requirement. If you have ScriptRunner, for example, in the Apps list in the navigation panel you would see "Enhanced Search".

Let's assume I don't have any third party apps.... 

You mentioned Requirements, User Stories, and Test Case counts in the hundreds. For a given Requirement, what is the range on the number of User Stories typically linked? And for a User Story, what is the range on the number of Test Cases typically linked?

75% of the time it's 1 to 1 to 1. The remaining 25% is mixed - There are a few User Stories that have multiple Test Cases and multiple Requirements linked. There are more User Stories that have multiple Test Cases but only 1 Requirement linked.

Do you typically have one User Story linked to only one Requirement, or are there User Stories linked to multiple requirements? Same question with regard to Test Cases linked to User Stories.

 

You talked about the need to do this linking in bulk. Does that mean you want to do that now for existing Requirements, User Stories, and Test Cases? Yes. This is retroactive an all existing What about going forward? I don't think it would be needed going forward since we already identified the issue and have changed our practices accordingly. This is really just to deal with all the stuff that already exists.

  1. If you add new Requirements, User Stories, and Test Cases do you want the links between Requirements and Test Cases to be created immediately? Usually when I start building Test Cases the User Stories and Requirements are already all input into Jira... If it's possible to automatically link User Story and Requirement to a Test Case upon its creation, that would be great... but I'm not sure how the system would know which ones to link to the Test Case....
  2. What would you want to happen if links between Requirements and User Stories change, or between User Stories and Test Cases?
    1. A User Story linked to a Requirement might be unlinked. Should the Test Cases linked to the User Story automatically be unlinked from the Requirement? No
    2. A Test Case linked to a User Story might be unlinked. Should the Test Cases automatically be unlinked from the Requirement to which the User Story was linked? No
    3. If you allow Test Cases to be linked to multiple User Stories, and User Stories to be linked to multiple Requirements, that would complicate this scenario as the unlinked item could be linked through another connection. Don't worry about doing anything for these types of situations. If anything becomes unlinked, I don't want any action to happen.
Trudy Claspill
Community Champion
January 19, 2026

Can you find out if you have any third party apps that extend the JQL capabilities? If you have ScriptRunner then Enhanced Search will be in the Apps list in the navigation panel. If you don't see that, ask your admins if you have any of the other similar apps, and if so, tell us which one(s) you have.

There are limitations on the structuring of automation rules, and having, or not having, an app that extends JQL will impact the recommended solution.

An alternative to using Automation would be to write custom code that uses the TEST API to accomplish the task.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events