Hello,
I want to create an issue in Jira using the Rest API.
Here is the JSON I am sending.
{
"fields": {
"project": {
"key": "KEY"
},
"summary": "Populating affects version",
"issuetype": {
"name": "Bug"
},
"versions":[{ "name": "1.0" }]
}
}
This works just fine when the name of the version already exists in the project but prompts an error if not.
"errors": {"versions": "version name '1.1' is not valid"}
Is there a way to populate the "affects version" (or any versions field) field if the value does not yet exist within the project?
Thanks.
The reason why most likely this is happening, is because you are sending a request to create a new issue, and not a new version (which relates to the project) To create a new version you must follow this API:
You could somehow use the native automation, which has the ability to create a new version.
Alex
Thanks that is what I did in the end. I was actually wondering is there was any way to create versions "on the fly". Aka if it does not already exist then it is created.
Infact there does not seems to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's good that you did that @Antoine [Klee Group]! Well done!
Kindly mark this answer as accepted, so as to help other people in this community to find the right answer to similar question.
Thanx!
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.