Reset issues id counter and then import issues with ids

Miroslav Kralik January 26, 2016

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 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2016

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

Miroslav Kralik January 26, 2016

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

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2016

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

Miroslav Kralik January 27, 2016

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. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2016

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"

0 votes
Miroslav Kralik January 27, 2016

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
TAGS
AUG Leaders

Atlassian Community Events