How to import issue and maintain Issue #?

I would like to import issues from our old system into JIRA. We would like to maintain for the initial import, the old Issue # and not have JIRA re-assign.

Any real feasable way to do this?

If we import, it does re-assign, can we run a SQL statement safely to set the #'s correctly from the external issue ID custom field?

Thanks!

4 answers

1 accepted

It's not possible when importing FogBugz. You can use CSV or JSON importer to set Issue Key while importing the data.

Either you manually update jiraissue table and run re-index afterwards (it's that simple) or modify source code for JIRA Importers Plugin's FogBugz Importer - IssueTransformer class and call externalIssue.setKey.

I believe that issue keys created as a result of the import can't be monitored as a result of concurrency of data being imported. Think of it as a race condition:

  • ORDER IN FOGBUGZ - A, B, C, D, E
  • ORDER AFTER IMPORT TO JIRA - A, C, D, B, E

Cases as this may be caused by the data within the Fogbugz issue itself; in the example above, maybe issue B has more data (comments, longer description etc) than A, C and D. I recall performing a test import from Bugzilla before, and in some cases, it turned out that way.

How about creating a custom field to store the Case ID ixBug Fogbugz field? Make it searcheable, map it during the import, and you can search for the imported issues in the Issue Navigator.

As Pawel wrote, you would be better off using a text custom field type.

The Import Plugin automatically creates the External Issue ID custom field for me on import, and it does appear to be a text custom field type as suggested by David / Pawel.

What I am ideally wanting to do is set the JIRAIssue.pkey column to be the same as the External Issue ID.

1
2
3
4
UPDATE j SET j.pkey = p.pkey + '-' + c.STRINGVALUE
FROM jiraissue j
INNER JOIN customfieldvalue c ON j.ID = c.ISSUE AND c.CUSTOMFIELD = 10102
INNER JOIN project p ON j.PROJECT = p.ID

However, I know and understand that updating the database directly (and not through the app or API) is never a good thing, so I would like to do it the proper way. :-)

If the JIRAIssue.pkey is just a "pretty display" column, different then the JIRAIssue.ID column, what might happen?

Thanks again!

Keith

The Import Plugin automatically creates the External Issue ID custom field for me on import, and it does appear to be a text custom field type as suggested by David / Pawel.

What I am ideally wanting to do is set the JIRAIssue.pkey column to be the same as the External Issue ID.

UPDATE j SET j.pkey = p.pkey + '-' + c.STRINGVALUE
FROM jiraissue j 
INNER JOIN customfieldvalue c ON j.ID = c.ISSUE AND c.CUSTOMFIELD = 10102
INNER JOIN project p ON j.PROJECT = p.ID

However, I know and understand that updating the database directly (and not through the app or API) is never a good thing, so I would like to do it the proper way. :-)

If the JIRAIssue.pkey is just a "pretty display" column, different then the JIRAIssue.ID column, what might happen?

Thanks again!

Keith

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,811 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot