Jira csv import issue

Aruna Nagaraj February 25, 2018

Hi,

I am importing Jira tickets from one instance to another using csv export and import functionality. I am facing two issues:

1) I have a problem that the stories are not getting linked using the Custom field (Epic Link) and Custom field (Epic Name) . I was trying to populate the "Issue Id " field to the epic link or the "Summary" to the epic name . Either didn't work 

2) The attachment filed has the details in the prescribed format of

date ;username;image name: image path . A sample is as below

04/Dec/17 12:31 PM;sgooley;screenshot-1.png;https://fairfaxmedia.atlassian.net/secure/attachment/52425/screenshot-1.png

but the attachments are not getting imported to the new instance . I can only see the date , user and image name but the actual attachment is missing.

Please help with these issues.

Thank you,
Aruna

1 answer

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

Hi Aruna,

In regards to the epic information not working during import, I think there might be some confusion about the way that data should be formatted in order to be imported.   Only the Epic issue itself is expected to have a value for the field called "Epic Name".  However that value is expected to be the value used to link this in the "Epic Link" field of the other issue types like stories/tasks/bugs/etc.   You will also noticed that only issues of type epic use the field "Epic Name", and that epics should never have a value for the "Epic Link" field since you can't link an epic to another epic.  However in the CSV file you still need to make sure the field exists

If you need to see an example of this, take a look at the KB: Cannot Import Epic Link from CSV due to Incorrect Format.  While that KB concerns the problems that can occur when you have two epics with the same name, it also provides a quick table that explains how this data file should formatted.

 

As for importing of images during a CSV import, the format you have looks to be ok.  However from reviewing the guide in Importing data from CSV, there is a note there that explains a possible problem:

Note that URLs for attachments support the HTTP and HTTPS protocols and can be located anywhere that your Jira Cloud site can access.

When I tried to go to that URL, I was prevented from seeing any file, likely because my account does not have access to that URL.  Can you confirm that when you enter that URL in your browser to can see that attachment directly?

Aruna Nagaraj February 27, 2018

Hi Andrew,

Thank you for your help and the pointers. I will go over the Epic link and give a try again

However,for the other issue of attachments, when I access the URL it downloads the image into my downloads folder

Regards,
Aruna

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2018

Is that URL in the same Cloud instance where you are trying to complete this CSV import?  Or is this a different Cloud URL?

Aruna Nagaraj February 28, 2018

The URL is of the cloud instance of where the tickets are currently (say cloud instance A) . But I want to import it to a new cloud instance (cloud instance B).

Thank you,

Aruna

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

Ok, that explains the problem here.  The Cloud B site, won't be able to see those files on Cloud A.   Unless that Cloud A URL was available publicly, this won't be a viable method to import these.

There is a related Kb on this in Importing attachments into JIRA Cloud applications using CSV files:  That KB offers another alternative way around this:

Import attachments separately

You can also omit the Attachments column from the CSV and bulk import the attachments later. To do this, follow the steps in Bulk import attachments.

Since it looks like we don't have these images stored in a publicly available site, I think that it might be more helpful to complete the CSV import without the attachments first.  And then go back and follow the Bulk import attachments guide for steps you can follow.

In that case, you will likely need to obtain these attachments by generating a site backup per Exporting issues.  While that backup is intended to be used for complete migrations, you could extract these attachments in the data/attachments/ subfolders.  From there these attachments are in subdirectories based on the project key.

Aruna Nagaraj March 4, 2018

Hi Andrew,

Thank you for your guidance. However, the exported file will have project key based on old Jira Issue Id. Whereas when you move to new Jira the issues numbers will not be the same . Please share if there is a way to deal with it rather than manually mapping the Jira folder name to new Issue Id.

Thank you,
Aruna

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2018

If you are creating issues in the new Jira instance using the Bulk Create option (Issues -> Import issues from CSV), then you can not map the issuekey field.  In which case, you are correct, you could not specify what the issue key would be when the issue is created on the new system.

However if you are using the CSV import (from system admin menu -> External system import -> CSV import), you can actually specify the issue key of the issue in the csv file itself and then map that value to the issuekey field in Jira.  This way the issues can have the same issue key they had in the previous system. 

This is essentially what I would recommend since your CSV export likely already contains this field and in turn you would need to know that issue key to then later correctly match up the attachments that go with that specific issue key.

Is there some other reason these issues in the new instance should not have the same key as they did in the other system?

Aruna Nagaraj March 6, 2018

Thank you.

The issue keys can be same as old system but I was not aware that it can be done that way.

The plan was to import issues which are not resolved into the new system. So there could be some gaps in the issue numbers. For the new tickets that will be created further, will follow what kind of numbering ? The numbers already taken up by the issue numbers will be omitted and the other numbers would be considered for numbering ?

Regards,
Aruna

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2018

Yes there would probably be gaps in the sequence of issue keys then in this case.  However the project will simply begin incrementing the issue key +1 after the highest number issue in the project.

I do not believe that having a gap between issue keys will cause any problem here though.  It would function just as if you had imported all the issues, and then just deleted those with an existing resolution.  Jira will not reuse issuekeys of deleted issues in a project, and the same is true in cases like this were you are importing a series of selected issues.

Aruna Nagaraj March 13, 2018

Thanks for clarifying .

Another problem I noticed is that when importing the tickets, the development history of commits etc from bitbucket are not shown on the tickets migrated though the Development field is mapped . 

Sample in the Development field are:

Sample 1 - {repository={count=6, dataType=repository}, json={"cachedValue":{"errors":[],"summary":{"repository":{"overall":{"count":6,"lastUpdated":"2017-10-05T11:45:07.000+1100","dataType":"repository"},"byInstanceType":{"bitbucket":{"count":6,"name":"Bitbucket Cloud"}}}}},"isStale":true}}


Sample 2 - {pullrequest={dataType=pullrequest, state=MERGED, stateCount=1}, json={"cachedValue":{"errors":[],"summary":{"pullrequest":{"overall":{"count":1,"lastUpdated":"2017-10-11T16:13:37.000+1100","stateCount":1,"state":"MERGED","dataType":"pullrequest","open":false},"byInstanceType":{"bitbucket":{"count":1,"name":"Bitbucket Cloud"}}}}},"isStale":true}}


Regards,

Aruna

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2018

Hi Aruna,

The bitbucket information that you might see on a Jira issue is not something you can import via the CSV import methods.

Instead for Jira Cloud, the recommendation is to use the JSON import method described in Importing data from JSON.   However the previous guide on Importing data from Bitbucket, does have some steps you can take to make sure that this data has been exported in a format that will be usable when you then use the JSON method to import this.

Aruna Nagaraj April 2, 2018

Thank you for all the pointers.

Suggest an answer

Log in or Sign up to answer