Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I have a requirement to import Stories into JIRA with a predefined Issue key

John Gaughan January 16, 2023

I am wanting to import >100 stories into a new instance of JIRA, such that I can link my Test Cases to those Stories and subsequently run them.

The ID's are in place in the Excel sheet as 'Issue Key' and I have tried to map that to Issue ID in JIRA - but the ID keeps reverting to system generated sequential one.

My question is how to keep the field value from the Excel sheet.

2 answers

1 accepted

2 votes
Answer accepted
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.
January 16, 2023

Welcome to the Atlassian Community!

I'm afraid you can't do this.  Jira always creates issues in projects with sequential keys, you can not define your own.  The reason you can map the key in CSV is so you can use the CSV to update the existing issues, but it will be ignored when importing new ones.

The only trick you can play is padding your CSV with duff issue data, filling in the gaps.

Say for example, you want to create ABC-123 and ABC-125, and the ABC project counter is currently 121, then create your CSV so that you have

  • ABC-122 - duff
  • ABC-123 - valid
  • ABC-124 - duff
  • ABC-125 - valid

Import that, and then delete the duff issues.

John Gaughan January 16, 2023

That would explain that then - so there is no way to link all my Tests, which will also be imported with the naming convention to match the name of the Story, to the issue key in JIRA. I may be able to use labels for the Story ID.

Thanks for the response Nic Brough

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.
January 16, 2023

Yes, I'm sorry, but there's no way to change the way the keys work in Jira (it would have to be redesigned and rewritten, almost from scratch, to accommodate this)

But you could import your keys into a custom field so you can find and map things more easily.  Your idea of importing them as labels is a good option, but I would be strongly tempted to use a dedicated field for it. 

Jira has a "system" field called "External ID" which you can't edit, but can import data into.  It's text, not a label, but it is intended for exactly this.  Or if label type fields are better for you, I'd suggest creating another dedicated label type field, rather than the global default labels field.

John Gaughan January 16, 2023

OK many thanks for the response Nic, I have used the generic labels field for now and if I encounter any issues moving forward I will make sure to use and re-purpose a system field as you have suggested.

Thanks again

0 votes
Ashley Hudson
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.
January 16, 2023

Heya @John Gaughan

So regarding the import, you would need to define the issue key header as issue ID and ensure that it's correct when trying the import! I had this issue a fair few times so ensure that you have the header correct, the mapping is correct and for extra review, you can select the box marked "Map Field Value" :)

For additional info on importing via CSV or how to format, please refer to the documentation below:

https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-a-csv-file/

Kind Regards,

Ashley Hudson

John Gaughan January 16, 2023

Hi Ashley, thanks for your response, I have checked and triple checked and it is still not working - I am wondering if it is something to do with the fact the field to map is not part of the 'JIRA fields' it is only present on the 'Links & Sub tasks' fields - so therefore it may not be picking up the correct value to display.

I anticipated this to be very straightforward as all I have done is export from one JIRA instance and want to import to a new JIRA instance.

I will read the documentation you have kindly included to see if there is anything else I can glean to help.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events