How can I define Issue ID and Parent ID before CSV import procedure?

Fedor Trutsko October 13, 2016

This question is in reference to Atlassian Documentation: Importing data from CSV

How can I define Issue ID and Parent ID before CSV import procedure to avoid cases with duplicating of issues? 

 

I mean case when you are trying to upload issue with Issue Id which already exists in JIRA.

 

Thank you.

2 answers

1 accepted

1 vote
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.
October 13, 2016

You don't. If you already have a existing key,  the import has to assume you are updating existing data,  not creating a duplicate. 

Fedor Trutsko October 13, 2016

Are Issue ID and Parent ID used only for issues import from CSV?

When I tried to upload same CSV file with one Task and three sub-tasks in it two times in the row I found that second import process has created sub-tasks in already existed(imported in first try) Task.

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.
October 15, 2016

No, sorry, I think you're misunderstanding what the importer will do.

Let's say that the important fields in here are

  • Issue-ID - representing a JIRA issue id
  • Parent-ID - again, a JIRA issue id, but one that is intended to be the parent
  • Data - some other field with data in it.

If a record has no issue-id or parent-id, the importer has no information about existing data, so it will try to create a new record

If a record has an issue-id, then the importer will check to see if it can find that ID in the target system.  If it can, then the data must be an update of fields.  If it can not, then it has no information and has to assume this is a new issue

If a record has a parent-id, then the system will do the same as above, but working on the assumption that the data is for a sub-task instead

Fedor Trutsko October 16, 2016

Thank you, Nic.

 

So if I would like to import several tasks with sub-tasks inside and I would like to avoid case when existed data will be updated because of existed Issue Id will be defined in CSV file. How can I proceed with this? I have to enter Issue ID and Parent ID to CSV file for link between sub-tasks and parent tasks. But I don't know whether entered Issue ID is unique.

 

Thank you.

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.
October 16, 2016

Right, that's covered in the docs - go to https://confluence.atlassian.com/adminjiraserver071/importing-data-from-csv-802592885.html and read the section "Creating sub-tasks"

Fedor Trutsko October 16, 2016

I've already read that topic.

 

Thank you for your help, Nic.

Probably I am not accurate with my questions.

 

I am trying to import new Task(with sub-tasks) from CSV to existed JIRA Project.

  1. Don't want already existed issues be updated because of my import;
  2. Don't want to lose any other existed data because of my import.

So what Issue ID and Parent ID should I enter to CSV file?

Can I verify somehow which Issue ID and Parent ID are already used?

 

Thank you.

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.
October 17, 2016

They can't be "already used", they're part of your data that you set up to show the importer the relationship between "issue on line 87 is a subtask of the issue in line 4"

Fedor Trutsko October 18, 2016

Thank you, Nic.

Now it is clear for me.

Have a good time.

Denise Del Bando May 9, 2018

I didnt understand the reply of Nic.

I think I am having the same issue.

 

I upload issues with ID 1,2,3 on Sprint 1

then I wanted to add sprint 2 still using bulk upload. How would i know i have to start with ID 4,5,6 and not go back to 1,2,3? 

I tried uploading 1,2,3 with the intention of not updating old tasks but to create new ones. but it failed because it said it already exists. 

Because i knew the last used id was 3, i knew i had to use 4,5,6. But if someone in our team had to upload, how will they know this?

 

And i needed to specify the id because i had to define sub tasks.

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.
May 9, 2018

I know, this is a really hard one to explain. But could you take a step back, and explain what you are trying to achieve here?  I can't see whether you are trying to import new issues (with subtasks?) or update existing ones?

Tyler Yoder May 15, 2018

I have the same issue as Denise I think. Let's say I have sprint 1 with 3 user stories. In my CSV I enter Issue IDs 1, 2, and 3. 

The documentation here mentions the Issue ID must be unique and sequential. It mentions nothing about being unique to the entire project, and I think a lot of users are interpreting that line as "unique to the particular CSV". 

When sprint 2 rolls around, I have 3 more stories.  Based on Denise's and my own logic, it would make sense that this new CSV for sprint 2 can also use Issue IDs 1, 2, and 3 for the 3 new stories and they will be created as new stories in JIRA, not update the last sprint's stories. I think what you're trying to say though is that Issue ID is stored in JIRA, so the first sprint's stories will always have the Issue IDs of 1, 2, and 3. For Sprint 2's stories, we must use Issue IDs 4, 5, and 6. 

This is not clear in the documentation and has caused a lot of headaches. Because JIRA stores that ID, the user must remember what ID was the last one used or come up with a random number each time, right? It would make much more sense to me if the ID was only temporary for linking during the individual CSV import. 

Would this solution work? If I appended the current date to the beginning of the ID, then made them sequential, I doubt I'd ever repeat them. IE if I had to import a story I would make the Issue ID "051520181", then the next would be "051520182", and so on. 

Like # people like this
Prateek Yadav April 10, 2019

I have a question related to update link of two issues.

I have a JIRA ticket which is of 'issue type' story. (TEST-1)

I have 3 JIRA ticket which is of 'issue type' Development Task.(TEST-1,TEST-2,TEST3)

 

I'm trying to link these 2 issues via csv bulk upload. Parent-Child (Story as Parent and Development Task as child)

I have tried multiple options. For e.g. mapping column which has key (TEST-2) to 'Issue key' and then mapping column which has parent(story) issue key (TEST-1) to 'parent id' and then uploading. It created 4 new issues and doesn't link them. I was expecting it will not create new issues as issue key already exists. I have tried mapping different csv column to different dropdown options but now luck. Each  time it creates either 1 new issue or 3 new issues or 4 new issues.

 

I'm not sure if what I'm trying to achieve is even possible or not. 

 

Thanks,

Prateek

Neil Lennon June 23, 2020

Hi all, i think i am having a similar issue. I would like to import a csv in which I have both the tasks and the sub-tasks listed. Example

Task - Add button

Sub-task 1 - Build Button

Sub-task 2 - Wire up button API

 

How, in a single sheet do i make Sub-task 1 and sub-task 2 sub-tasks of the Task WHERE the Task does not exist before the import ?

 

Thanks in advance 

Prateek Yadav June 23, 2020

Below is how you create your .csv file.

Screenshot 2020-06-24 at 12.01.47 AM.png

Like Daniel Zimmermann likes this
Neil Lennon June 23, 2020

Thank you Prateek 

Like Prateek Yadav likes this
Neil Lennon June 24, 2020

Hi, I have a follow up question which i cannot seem to find an answer too on Google 

The BA i am working with users another program to update her tickets. Each week i get a report of these updates and have to manually find and replace the Description field for many tickets.

Is there a way in Jira to "import" these in a single bulk move ? 

I have looked at Bulk Change, but this dose not allow it ( assume as different for each anyway) and Bulk Import does not allow me to associated the key, hence i assume does not allow it - unless i am missing something.

 

Does anyone know if this is possible and if so how to achieve this ?

 

Thanks 

Prateek Yadav June 24, 2020

Both "Issue Key" and "Description" are part of bulk import, so you can use them for your requirement.

Issue key shall be used for already created issue on Jira. You can map description to it, whenever it changes.

 

Screenshot 2020-06-25 at 12.40.34 AM.png

Neil Lennon June 24, 2020

Thank you fro your reply Prateek. Unfortunately i do not see that option. 

I am using the cloud instance and am administrator will all admin rights 

Is there something i am missing ? 

Thanks in advance 

 

image.png

Neil Lennon June 25, 2020

Hi Prateek

Please ignore the above, i have discovered that if you go Cog > User Management > Jira > External System Import that the options are different AND the issue key is available.

 

Thanks again for your help   

Prateek Yadav June 25, 2020

Yes Neil. That’s an existing behaviour. Options differ for import when you access it from different locations. Jira should have had set this based on user access and not the location from where it is accessed.

 

Also, there are some bugs when you do import from normal import issue screen. So avoid that.🙂

Like Neil Lennon likes this
0 votes
Rohaan Thavarajan August 25, 2020

Hi,

Has there been any follow up to @Tyler Yoder query from May 15, 2018?

It seems counter-intuitive that the issue ID must be unique for a project, as that is what the Issue Key would used for. Using the issue/parent ID is the only way to link sub-tasks to their parent.

Creating this restraint on the Issue ID means that any particular user importing data would have to keep track of the last ID added into the system, which adds an extra level of complexity to manage.

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.
August 25, 2020

I think you have missed the point of the conversation above, but that would not be a suprise as this is not obvious and I do not think the language in the docs helps much.

Put simply, the Jira issue key and the Jira issue ID have nothing to do with the ID in the import file.

The import-issue-id does not have to be unique for the project, just for the import file (although if you do many imports, it should be unique to the issues in the import file).

A user has absolutely no need to track the last ID added.  Jira handles all of that.

The most simple example I can give of a CSV to show how this works:

+ CSV ID + Jira Key + Parent ID + Summary
|137 | | | A new issue
|42 | | 137 | A new subtask of 137
| | ABC-123 | | An edit to existing issue ABC-123
Like Prateek Yadav likes this

Suggest an answer

Log in or Sign up to answer