Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Pushed defect to JIRA does not retain the User Story reference



I’m relatively new to TestRail and am carrying out a proof of concept for our organisation. We are using JIRA Cloud with User Story, Task, Bug and Epic issue types configured.

What I’m trying to effect is a link between bugs and user stories in JIRA through TestRail. Here’s my Use Case (any constructive criticism welcome!)

From a user story I create a test case
In TestRail I create a test run and execute the test case
The test case fails so I ‘push’ a defect to JIRA (which correctly raise a bug issue type in JIRA)
I want to capture the User Story that is associated to the test case (issue links - I have this working)
When I submit the defect to JIRA I effectively have a new bug issue in JIRA which contains a link reference to the User Story that ‘failed’

Points to note:

  • I have used the automatic JIRA Configuration in TestRail
  • I have switched on what I think are the relevant push.fields

When I view the bug in JIRA the link reference that I capture via TestRail is not visible anywhere.
Is there a separate field that I need to configure for the bug screen in JIRA, or, is this functionality just not working?

I’ve searched through the forums and had a mess around with both application configurations but would appreciate any help with this.

Many thanks,


Hi Andy,

Thanks for your posting. For test cases that belong to a user story, we can recommend adding the issue ID to the References field on the case level. This will automatically show the test cases and all related results on the JIRA issue page with the TestRail for JIRA add-on:

Have you already installed the add-on on JIRA’s side or “just” setup the integration in TestRail (the Push/Lookup integration on Administration > Integration in TestRail)?



Hi Tobias,

Thanks for getting back to me.

I have installed the TestRail add-on in JIRA.

Let me clarify what I was hoping to see:

In JIRA I want to open up a bug (that was created by TestRail) and see somewhere in that screen which User Story it relates to (proving traceability).

Steps to recreate:

  1. I open a User Story in JIRA
  2. I hit 'Add Test Case" under the TestRail: Cases section
  3. I choose the project and hit ‘Add Test Case’
  4. TestRail is opened and I create a test case; the Reference field automatically captures the associated User Story
  5. I save the test case and create a test run
  6. I change the status of a test case to failed and in the Defects field hit ‘Push’
  7. Defect form is filled in, noting that issue link is filled in with the User Story ID
  8. This form is submitted and the test run results saved
  9. When the bug issue is viewed or edited in JIRA the User Story ID is not visible (I was expecting it to be in the “Issue” field

Any ideas?



Hi Andy,

Thanks for the additional details. In this case, the bug issue (or more precisely, the test result with the bug) would be shown on the issue page of the user story and not the other way round but you can quickly jump from the bug issue to the user story through TestRail. Just open the linked test result in TestRail and you would see the user story as part of the References field of the test. Clicking on the issue ID would then open the issue in JIRA.

I hope this helps!



Hi Tobias,

Appreciate the reply - thanks!

In this case the error is mine. I had configured the integration correctly
but was (incorrectly) expecting the User Story reference to appear in the
JIRA field “Linked Issues” rather than the TestRail field “Issue Links”.
Everything is now working perfectly.

The application itself is spot on for what we need and I will be putting in
a purchase request for subscription shortly.

I appreciate your help and support - keep up the excellent work!



Hi Andy,

That’s great to hear and thanks for the feedback :slight_smile: