How Do I Link a New Task to an Existing Epic when doing a CSV Import?

KD September 21, 2021

I am importing some new tasks in to Jira via CSV and I want to be able to link them to an existing Epic while also blocking an existing User Story.

I have been able to successfully do a CSV import that creates the tasks with the values I want set and create the "blocks" link, but I am not able to get the import to create the link to the existing epic.

My CSV is set up as follows:

issuetype, epic link, summary, priority, assignee, reporter, link "blocks", original estimate

Task, XXX-404, New Task Description, Medium, Assignee1, Reporter1, XXX-460, 36000

XXX-404 is the key for the existing Epic.

XXX-460 is the key for the existing Jira to set up the blocked relationship.  

Everything is working except the creation of the link to the Epic.  The issues are being imported in to Jira successfully and no errors are being reported.

3 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2021

Hello @KD 

Welcome to the community.

Are you importing into a Company Managed project or a Team Managed project?

If importing into a Company Managed project, then add a column named "Epic Link" to your CSV and in the column enter the issue key XXX-404. You will need to map that column to the "Epic Link" field when mapping other fields for the import. That should add the item as a child issue of the Epic XXX-404

KD September 21, 2021

Thanks Trudy, I am in a Team Managed project.  Any suggestions on how to make the link in a team managed project?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2021

I don't think it is possible to link a new issue to an existing Epic in a Team Managed project using CSV import.

In Team Managed projects the Epic Issue Key is stored in the Parent field for its child stories, whereas in Company Managed projects it is stored in the Epic Link field.

In Company Managed projects the Parent field is used only in Sub-tasks to store the issue Key of the issue that is the parent of the sub-task.

Based on my experimentation with CSV import, when Parent is selected for the mapping field, the import process assumes that the issue being imported is a sub-task. If the Issue Type of the imported issue is not a sub-task issue type, then the import process reports this warning:

"Issue 'summary text doesn't have Subtask Issue Type, its Parent Id mapping will be ignored."

...and the imported issue is not added as a child of the Epic.

Like # people like this
KD September 27, 2021

Thanks Trudy, I've found some other info that also says the same, that it isn't possible in a Team Managed project which is too bad.  I've just added a label during the import for now and then go in and make the bulk change after which is an extra step but not horrible.  Thanks again for the help.

Like Fernando Candia likes this
Micheal Planck June 4, 2023

In Team Managed projects the Epic Issue Key is stored in the Parent field for its child stories, whereas in Company Managed projects it is stored in the Epic Link field.

Why would any programming house do this to itself? Is Atlassian staffed entirely by masochists? Does half the company hate the other half? Are they locked in mortal combat with each other, and the winners are the ones who shoot themselves last?

Didn't we all learn, in our very first programming class, "which one of these things is like the others?"

I honestly don't understand.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2023
Micheal Planck June 5, 2023

That looks like they are switching over to the new style of managing epic links. Which, frankly, makes it even less understandable that they rolled out their new structure before it was fully supported.

They could have said, "here's a new, fully functional approach and look - it's got sweet reasons to upgrade to it and abandon all your legacy stuff."

Instead, they said, "stop using your old, trusty way, and use this new way which doesn't work yet."

I mean, you get my confusion, right?

0 votes
ashok.kr.jha March 29, 2023

I'm Importing Issue in Company Managed Software project on Jira Server version (v8.13.10): While importing issues from CSV using "External System Import" getting Null pointer for Epic Link field.

For Every Task/Bug/Story in CSV For Epic Link field we have given Issue Key (e.g. DUF -50123)

CSV contains issue in below order:

  1. Epics,
  2. Story,
  3. Bug   

Epic link available for Story or Bug only.

Error Message:

 Cannot add value [ [DUF-50123] ] to CustomField Epic Link in Issue with summary 'Sample Issue Summary'. Exception Message: null
java.lang.NullPointerException
 at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.collectProjectTerms(DefaultPermissionQueryFactory.java:141)
 at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.createQuery(DefaultPermissionQueryFactory.java:79)
 at com.atlassian.jira.issue.search.parameters.lucene.DefaultPermissionQueryFactory.getQuery(DefaultPermissionQueryFactory.java:62)
 at com.atlassian.jira.issue.search.parameters.lucene.PermissionsFilterGeneratorImpl.getQuery(PermissionsFilterGeneratorImpl.java:37)

 Note: For cloud version above configuration for migration is working. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

Hello @ashok.kr.jha 

Welcome to the Atlassian community.

The original post is over a year old, has an Accepted Answer, and concerns Cloud, not self-hosted. Since your scenario is different, please start a new Question to get help with you use case.

Like ashok.kr.jha likes this
ashok.kr.jha March 30, 2023

Thank you @Trudy Claspill ,

I've raised new question: Error linking the Task/Story to an Existing Epic i... (atlassian.com).

Also if it didn't work then planning to use REST API. Data volume is big so automation required.

0 votes
Takafumi Ohtake -Ricksoft-
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 6, 2022

I'm facing this problem too in a team-managed-project.

The related issue is https://jira.atlassian.com/browse/JSWCLOUD-17758. I voted for it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events