Can I create a new issue using the API, where I can assign the issue key value?
For example;
My Project ID is "DEMO"
I want to create an issue in this project and assign it a key of "DEMO-123". This is the only issue in this project.
The interesting thing is that I can do this when I do an import with an xls, but I can not figure out how to assign a specific key of "DEMO-123" when I create an issue using the API.
POST /rest/api/2/issue
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-createIssue
I looked at the createmeta and nothing is standing out as far as what I can use if this is possible.
Hi @JudeLabs
No, it's not possible, the issue id is auto generate and increment base already existing id's, you can't set it on your own
When using the import function, mentioning issue ID is just to tell the import mechanism to update existing issue.
If there is no issue with that key it will do nothing for that raw or create a new issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nir
I sometimes use the 'external system import' function to deliberately create an issue with a specific issue key. This works, if I specify the issue key in the csv file, and map that to the issue key field.
In my experience Jira server and data centre do not generate the next available key, if a valid key is entered in the csv file.
The next issue created using the standard web gui interface will be given a key that is 1 number higher than the one I imported.
So I assume the Jira API must have the ability to do this, or am I missing something here?
Thanks
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John.
I have the same exact doubt. We also import CSVs to explicitly define the new issue's key, but can't find a way to do it via REST. Have you found any alternative?
Thanks,
--
Luis
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.
!:(
I'm considering "importing a CSV" with 499999 rows to create enough "placeholders" to allow me to choose the issue key I want to use via REST. Sounds dumb, but there's no way to automate the CSV import ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did the same a few years ago, to reserve a range of key IDs. Still using that project now.
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.