Hi,
Using JIRA 6.2.2 REST api (/rest/api/2/issue/bulk), I am currently able to create bulk issues for my test JIRA project.
However I could not find any information as to how to update existing issues (in bulk) using REST.
In my request (I pasted it below), I tried to set specific JIRA issue keys so that it would update existing issues but instead, it creates new set of issues while ignoring the issue keys that I tried to set.
Can anyone please help? Thank you!
{
"issueUpdates": [
{
"update": {},
"fields": {
"project": {
"name": "SR",
"key": "SR",
"issues": [
{
"key" : "SR-100"
}
]
},
"summary": "something's wrong",
"issuetype": {
"name": "Story"
},
"description": "something's wrong"
}
},
{
"update": {},
"fields": {
"project": {
"name": "SR",
"key": "SR",
"issues": [
{
"key" : "SR-200"
}
]
},
"summary": "something's very wrong",
"issuetype": {
"name": "Story"
},
"description": "something's very wrong"
}
}
]
}
If you know all the keys of the issues you want to change, why don't you just call /jira/rest/api/2/issue/{issueIdOrKey} with all those keys? If you use a skript you could just put it in a loop through all the keys and be done.
The /bulk method unfortunatly does not support PUT, so it won't allow the function you want to get. So if you really want to use a single call you only have the choices of looking for a plugin providing this function or maybe write your own extension to the Jira rest api
Thank you for your help! Updating by issue-key worked for me.
My only remaining question is, is it possible to create issues with specific issue-keys?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, that is not possible. While there might be a dirty hack by going through the database directly, it would involve quite a lot of really sensitve code and your system admin would hate you for life.
If you just need to get the key of issues you just created, I think the rest api will return the key along some other data to you after you call a create, just like the IssueManager-class would return you an issue created through its interface
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's unfortunate but thank you for your help. I played around with JSON Importer and found out you can create issues with specific issue-keys so I may go that route. Again, thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using Bulk, what is the JSON format for Bulk issue creation, The document example just shows about updating issues not creating issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.