While performing the Import and Export of CSV files from one instance to another i want capture

Sreenadh
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 3, 2023

Hi,

While performing the Import and Export of CSV files from one instance to another i want capture same issue key is it possible in JSM.

Please help me out on the same.

Thanks,

3 answers

0 votes
Suzi Firth
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 5, 2023

Hi,

Yes, this possible.

Create your project in the new instance with the same Key.

When importing by CSV, ensure you have an Issue Key column with values in issue key format like so:

ice_screenshot_20230306-155750.png

And then they'll upload with the same key.

ice_screenshot_20230306-160722.png

Cheers,

Suzi

Nic Brough -Adaptavist-
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 6, 2023

I am afraid this is misleading. 

Issues will be imported with keys created in line with the sequence for the project they are being imported into.  Think of it as being the same process as when a human clicks "create issue" for each line in your CSV

If you map the issue key in the CSV to the key in Jira, then Jira will look for the issue key, and if it finds it, treat the import as an edit of the existing issue.  If the issue does not already exist, then it will create the issue with the next number for the project.  It will not use your "issue key"

You can map your issue key into a custom field to hold it as a reference, but it will not be the key of the issue.

Suzi Firth
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 6, 2023

Hi Nic,

I have done the exact process I outlined above and it worked.  We deactivated an old instance and brought it in under our new instance as an new project. We have retained the same key for every ticket so that if staff need to refer back to an old ticket and they have the number it matches to the new instance. In this situation we were moving to a new project with no tickets in it so none of the issue keys existed in the new project.

However, yes I agree if they are moving to an existing project that is already in use with multiple tickets and the key already exists it will update the existing ticket. In which case, it is better to have a custom field, move the previous ticket number value to that column in the CSV and then Issue Key will be the value from the new instance that you want to update. 

Nic Brough -Adaptavist-
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 6, 2023

I'm afraid you have not.  I suspect what you have done is used one of the tricks - the keys in your files line up with the current project counter settings, so you've just set it up to create things in the right order. 

Suzi Firth
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 6, 2023

I haven't what? Imported all my tickets with the correct key, date it was created in the old system, all its comments and fields into my new system? 100% sure I have.

Nic Brough -Adaptavist-
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 7, 2023

You have not imported the keys.  The rest of it, you have, of course, but you did not use the keys.

Your import file will have contained rows in key order, which will make it look like you have imported key-for-key in the target, but it hasn't imported the keys, it's generated them in the order you happen to have in the import.

Suzi Firth
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 7, 2023

Hi Nic,

I think you're going to have to agree-to-disagree with me.

There is no order in my CSV upload file that I did for the key. It jumps all over the place., there's gaps in the numbering because of deleted issues etc., Every issue key has been uploaded with the key I listed in the CSV. 

Cheers,

Suzi

0 votes
Nic Brough -Adaptavist-
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 4, 2023

Your two systems use different numbering systems, so there's no way to guarantee that any import can preserve the numbers.

There are a couple of tricks you can play on Server that can preserve incoming issue keys (as long as they do not already exist in the target, but there's nothing for Cloud.

0 votes
Asha Goyal
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 4, 2023

Hello @Sreenadh 

When exporting issues from Jira to a CSV file, the issue key is included in the file by default. However, when importing the CSV file into another instance of Jira, new issue keys will be generated for the imported issues.

Thanks

Asha

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events