CVS Import: Issue not assigned to Epic
Asked by Bryan Case:

We are using a CVS file to import into Jira. The first line is creating an Epic. The following lines create stories or task under that Epic.

Sometimes it works just fine. However occasionally the new Epic is not linked the stories and tasks.

Any idea what might be going on?

Bryan


Answers:
author: Seon Shakespeare
body: Hi [@Bryan Case](/t5/user/viewprofilepage/user-id/5580086)

Welcome to the community!

It's tough to say exactly why your Epics aren't always linking correctly without seeing your CSV file, but here's some tips:

* **Epic Setup:**

  * Make sure "Epic" is a valid issue type in your project
  * All your Epics should be at the top of your CSV file
  * Each Epic must have a unique "Epic Name" (this can be the same as the Summary or different)
* **Linking Child Issues:**

  * Any stories or tasks that belong to an Epic need their "Epic Link" field to match the Epic Name exactly

You could also try exporting a few exisitng issues that are already linked to Epics. This will help you compare the formatting to check it's the same.

If you follow these steps and it's still not working consistently, sharing a few sample rows from your CSV (with sensitive data removed) might help the community spot the issue!

comments: author: Bryan Case
body: Issue Type,Fix Version,Epic Name,Summary,Description,Story Points,Assignee,Epic Link  
Epic,ESG,Lake,Heavens Lake. The project manager is Dave.,The project manager is Dave.,,apirlX,  
Story,ESG,,Interview questionnaire completed,"Explore product details and help get your concept approval, including meetings with eng team",1,apirlX,Lake  
Story,ESG,,ODM Selection Process,,1,apirlX,Lake  
Task,ESG,,Inputs to RFQ/RFP,,1,apirlX,Lake


author: Seon Shakespeare
body: Thanks for sharing those rows! It looks like your CSV structure is correct for linking issues to Epics.

As [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) suggested, it's possible that Jira is trying to link the stories and tasks to the Epic *before* the Epic is fully created during the import. This could explain why it works sometimes but not always.

There are a few things you can try:

1. **Split the import:** You could follow Jack's suggestion and split the import into two separate files (one for Epics and one for stories/tasks)
2. **Prioritise Epics in the CSV:** You could also try making sure ALL your Epics are at the very beginning of your CSV file. Jira processes imports row by row, so creating the Epics first should ensure they're available for linking when the stories and tasks are imported.

Hope this helps!


author: Jack Brickey
body: You might try importing the Epics first and a subsequent import for the stories. It could be a race condition is happening as part of the import where the epic is not fully baked before you were trying to add issues to it.

comments: author: Bryan Case
body: This is also what I was thinking. I was hoping for a solution other than creating two import files.


author: John Funk
body: Hi Bryan - Welcome to the Atlassian Community!

Can you share your header row (and maybe first line) of the CSV?


Tags: data-center

jira-data-center

jira-server

server