I can't find documentation on how to change the versions of an project when using the Atlassian Jira REST Api.
Hello,
Do you need to assign a version to an issue or change version's attribute like name and release data?
No, I want to change the version of a project. When I manualy create an project I can add versions to the project. Now I want to create projects with the Jira REST API and I need to add, some times remove, version information to and from those projects.
When I read a added project with the Jira REST API I see no versions, '"versions":[],', how can I manipulate the versions assigned to a project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kindly read this info on Rest Api about versions:
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.
Tou pointed me in the right direction, thank you for that. Now I have a problem that when I want to add a version to a project I get an Bad Requist error 400.
The data I send is exactly as in the example:
{
"description": "5.0.1813.05",
"name": "5.0.1813.05",
"archived": false,
"released": false,
"releaseDate": "2018-07-30",
"userReleaseDate": "30/jul/2018",
"project": "FLXI",
"projectid": 10000
}
The project exists, it's the right project id, I use POST mode, the url is correct, and the content type is set, the content length is set and the json string abouve is send to the web request stream. I am missing something but I don't know what.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And because I use HTTP I also filled httpWebRequest.UserAgent = ".NET Framework Client";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you provide the response json? When you make a request, besides the error you also get a json back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your time. I use c# and the RestSharp assembly to communicate, in the exception I get I do not see any json, what I do see when I catch the exception is a response part in the details.
In that response part I see a content type "application/json;charset=UTF8", the method used "PUT", the status code "BadRequest" and a status "ProtocolError".
I send the request as an ansi string, do I need to send this request UTF8 encoded? (I already tried but that failed in a quick test)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure about c#. You can take Postman or Soap UI and try to execute there. if it works, then the problem is with your code.
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.
The problem is solved. 3 'errors' in my json.
projectid should be projectId, it is not allowed to provide releaseDate and userReleaseDate and it is not allowed to provide project and projectId.
{
"description": "5.0.1813.05",
"name": "5.0.1813.05",
"archived": false,
"released": false,
"releaseDate": "2018-08-03",
"project": "FLXI"
}
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.