Reset issues id counter and then import issues with ids

I have a case when I have an existed project with created issues and what I need to do is follows: 

  1. Delete all current issues from the project
  2. Reset the counter for issues, so the counter will start from 1 again
  3. Import issues from different JIRA instance to this project using import tool via csv (I would like to keep the IDs of all issues from this csv file)

 

My question is, what will happen when I create an issue with ID1 by standard way, then import issue (using import tool from csv) with ID2, and then I will create another issue by standard way that should have ID2 (based on the counter)? Will it override the content of imported issue ID2 or the JIRA is so smart that it will check if there is already an issue with that ID in the system and will use ID3? 

 

Thank you, Miroslav

 

2 answers

1 accepted

0 vote

If you have an issue ID on an import, then JIRA will treat the imported data as an update to the existing issue.

Thank you Nic.

And if it is the other way? I will import the issues and then create an issue by the standard way, but with the original issue id counter , the newly created issue is supposed to have ID which has been already imported from CSV? 

What will happen? 

  1. JIRA will override the imported issue
  2. JIRA will check if the ID already exists and if so, find the closest "free" ID that has not been taken
  3. JIRA will check the last ID and the next create issue will get last ID +1

 

Same answer - you've given it an issue ID, so it's an update to the existing issue.

Actually this does not seem to be true. I am doing few tests and when my counter is set to 1 (or when I create a blank project), import the issues from CSV and then create a issue by standard way, JIRA looks for the last (biggest) issue ID and increase it by 1. 

So if the biggest ID is 85, when I create new issue, it will have issue ID 86. 

The correct answer from the points above, is n. 3.

Though thank you for your time Nic. Appreciated. 

No, that's an oversimplification, and incorrect.  But I've left something out of my explanation that would have made it much more clear.

If you give it an existing issue key, it will update that issue.  If you give it a non-existent key or a blank value, it will create a new issue with the same logic as the "create issue"

When my counter is set to 1 (or when I create a blank project), import the issues from CSV and then create a issue by standard way, JIRA looks for the last (biggest) issue ID and increase it by 1. 

So if the biggest ID is 85, when I create new issue, it will have issue ID 86. 

The answer: JIRA will check the last ID and the next created issue will get ID calculated as: last_ID +1

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you