I have some issues on an old OnDemand instance that I want to transfer to a new OnDemand instance, and I can't use the bulk import/export feature for various reasons (primarily because it clobbers all existing issues in the new instance). I want to use the REST API to grab issue information from the old instance and create equivalent issues on the new instance, and ideally, I'd like to keep the issue keys the same -- so that issue ABC-123 on the old instance is still issue ABC-123 in the new instance. Is it possible to specify the key when you create a new issue? (I tried using a PUT request on the URL with the issue key, and it wouldn't allow me to create the ticket when it didn't exist.)
Community moderators have prevented the ability to post new answers.
I dont think you can provide issue key that you want to create. You can simulate that though using your code.
What I did was to read the old instance, sort all issues by issue key, read one by one and create them in new instance. If the issue keys are not sequencial, you need to do a check and create dummy tasks in new instance for missing issue keys in old instance. Once all is done, delete all the dummy tasks from new instance.
Another option would be to update the DB directly after creating all the tasks with rest api.
You will need to update the issuenum field in jiraissue table for each issue that doesnt have correct issue key. Then you have to update the project table to put the highest issue key that is created for that project, so next task gets created correctly.
Vijay
Hi, I think I have an similar question to David. Indeed, I use JIRA CLI (Command Line Interface) in order to create Issue to a new JIRA, but I want to keep/to choose the issue key when I use the function create Issue in the target JIRA. Currently, the issue key is generated automatically. Regarding this point, did you able to progress as far ? to find a workaround ?
Thanks,
Emmanuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.