Forums

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

How to bulk link test cases to a story

Dalya Razzak
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!
March 20, 2017

In JIRA : 

  1. i searched for a bunch of TC's 
  2. Tools >> Bulk change >> All selected issues (~7) >> 
  3. Select all >> Next >> I want to link to a story and not an epic...how can i do that?

 

5 answers

0 votes
Heenaben Sardarbhai Chaudhary September 1, 2024

Hi @Dalya Razzak ,

I'm not completely sure if there's an existing feature for this, but you can definitely achieve it with APIs. I actually have a script that performs a similar task, so I thought I'd share it with you.

Quick Summary: This script takes an Excel file with your issue link data and interacts with the Jira API to create those links. It also adds a brief delay between requests to help prevent any issues with API rate limits, which is quite useful.

Here's How It Works:

  • Excel File: Ensure your Excel file (e.g., issues.xlsx) is set up with columns like InstanceLink, linkType, parentIssueKey, childIssueKeys, and API_TOKEN. You can use the template provided in the repository for reference.
  • Running the Script: Once your Excel file is ready, you just need to run the script using node start.js issues.xlsx. The script will then link each child issue to its respective parent issue as outlined in your file.
  • Error Management: If any issues arise, such as missing data or API errors, the script will log a warning but continue processing.

A 100ms delay is built in between API requests to avoid triggering Jira’s rate limiting, so you don’t have to worry about some links failing due to too many requests being sent too quickly.

You can find the repository here.

And while we’re on the subject of automation, if you’re looking to simplify your test case creation and linking process, I’d recommend checking out Test Case Assistant for Jira. This tool helps you automatically generate and attach test cases to user stories with a single click. It even uses AI to generate these test cases based on the specifics of your user stories, making the process both smoother and faster.

Whether you’re managing a few test cases or handling a larger workload, this tool can really streamline your workflow. If you’re interested, feel free to explore the documentation or get it from the marketplace.

0 votes
Nicolás Sánchez
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!
April 11, 2022

Why is this still not implemented? 
For me, it is a key functionality. Sometimes I need to link a bunch of Test Cases to an EPIC or US based on some criteria (using JQL for example). It's unfeasible to manually add that many TC's.

Workaround (not working): Somewhere else I read someone proposed the following: Create a filter based on that JQL and then Export it, grab the tickets Id's, concatenate them in a long string, and then Paste that on the Link issues search bar off the US/EPIC. The problem here is that you need to still have to select the ticket one by one, all the tickets involved won't be automatically linked. 

0 votes
Sanjeet Singh
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!
September 17, 2019

Jira does not allow to bulk link user stories but you can open the story and link multiple test cases there. This is just another way to bulk link few test cases  but if you have to link higher number this will be a little time consuming.

0 votes
Dalya Razzak
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!
March 21, 2017

Thanks for the feedback, it's a good feature to have though wink from the flow i described above for testers ..

Karalee Kikiros
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2017

It's likely been raised as a feature request or suggestion with Atlassian/Zephyr so if it's something that you really want, I suggest locating it and upvoting smile

0 votes
Karalee Kikiros
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2017

Hi Dalya

 

You can't bulk link tickets using bulk change. If you have the structure add-on you can create the links by dragging and dropping on an active structure (one that makes changes to JIRA tickets) or if you know the keys, type them out in notepad using xxx-1234,xxx-1235,xxx-1236 format and copy/pasting them into the linked issue field on the edited ticket is another possibility. 

 

You may find it easier to link from the story rather than the TC (assuming that the story has many test cases and not vice versa). 

 

Hope this helps,

KK

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events