Forums

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

Bulk update existing JIRA issue links by CSV for 2 differing issue types

Brian Hill
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.
July 16, 2018

I have a project with 2 differing Issuetypes: let's call them Type1 + Type2 (both of which are parent tasks, not subtasks)- that have been imported into JIRA through 2 subsequent bulk csv loads. Now I want to bulk load link relationships between the two. Common sense would dictate that I need to set in the CSV the following mapping:

Issuetype1 | Key | LinkRelationship | Issuetype2 | Key

It's not readily obvious to me how the Admin CSV import can handle 2 different Issuetypes in the import csv mapping to support the Source->Target, as the field mapping needs to be unique. For example, I can setup a CSV with Issuetype1 which can be mapped, but cannot map Issuetype2.

Love to hear how others have cracked this nut..

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 25, 2018

Hi Brian,

There is a separate KB that explains how you can use CSV imports in order to import issue links, please see How to Import Issue Links from a CSV File

The file does not need to contain the issuetypes, but it will need to have the issuekey or the issueid for each issue.

 one column must be mapped as Issue ID and the other as the desired link type (e.g. "Link 'relates to'"). The 'Link' column needs to have a value corresponding to the other issue 'Issue Id' value, or it needs to be an issue key of already existing issue within the JIRA instance to which the data is being imported. For example:

Summary,Issue Id,Link One,Link One,Link Two
House  ,       1 ,       2 ,       3 ,       2
Patio  ,       2 ,        ,         ,
Garden ,       3 ,  TEST- 1 ,        ,

The file above would create three issues with correctly created issue links:

  • Issue 'House' will have three links:
    • Two links of type "Link One" to issue 'Patio' and 'Garden'
    • One link of type "Link Two" to issue 'Patio'
  • Issue 'Garden' will be linked to issue with key 'TEST-1'

I hope this helps.  Please let me know if you have any questions about this.

Andy

Igor Kosoy
Contributor
May 13, 2019

It doesn't work for the Jira Cloud. Yet to find the way to Bulk Link issues.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2019

Hi @Igor Kosoy 

I just tried to follow that same KB for Jira Cloud, and I was able to import issue links in a CSV file.  So this document is not only for Jira Server, you can do this in Jira Cloud too.  The key is in how the CSV file is setup.

Summary

Issuekey

Link One

Link One

Link Two

House 

KAN-16

KAN-17

KAN-5

 

Patio 

KAN-17

        

KAN-5

 

Garden

KAN-18

KAN-16

        

KAN-9

In my example, I used all issuekeys.  I mapped issuekey to existing issues, and then the other link types like 'link one' to a link blocks, and link two to a link type of relates in the External System import (CSV) in Cloud.  This works to import those link types. For issues that already exist in your Jira project, you will likely want to first export a list of issue keys and current summaries.  You can do this in the issue navigator by searching for the issues you want to create links on, then exporting that as a CSV.  From there you can create these other columns in that CSV file for linktypes and enter in the issue keys of the issues you want to link them to. 

When you are importing this file into Jira, you only need to map summary, issue key (if updating existing issues), and the link types if you select a specific project to import into.  If you don't pick a specific project to import to you would also need to define project name, project key, and project type.

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer