-
Type:
Bug
-
Resolution: Obsolete
-
Priority:
Low
-
None
-
Affects Version/s: 6.4.5, 7.2.7, 7.3.1
-
Component/s: Documentation - All, REST API
-
6.04
-
2
-
Severity 3 - Minor
-
0
Summary
Using the example listed in /rest/api/2/version for the JIRA REST API documentation does not work.
Example
{
"description": "An excellent version",
"name": "New Version 1",
"archived": false,
"released": true,
"releaseDate": "2010-07-06",
"userReleaseDate": "6/Jul/2010",
"project": "PXA"
}
Steps to Reproduce
- Create a project named PXA
- Run the following command
curl -D- -u user:pw -X POST --data @myfile.txt -H "Content-Type: application/json" http://<instance-url>/rest/api/2/version/
{ "description": "An excellent version", "name": "New Version 1", "archived": false, "released": true, "releaseDate": "2010-07-06", "userReleaseDate": "6/Jul/2010", "project": "PXA" }
Expected Results
Version is created
Actual Results
Error
{"errorMessages":["Only one of 'releaseDate' and 'userReleaseDate' can be specified when creating a version."],"errors":{}}
Notes
- Additionally, if you remove the userReleaseDate parameter, the version will be created.
- However, anytime a value is set to true for archived or released, it always gets set to false. This need to be clarified as well whether it is possible to set the value as it is being mentioned in the example.
See:
{"self":" <instance-url>/rest/api/2/version/10010","id":"10010","description":"An excellent version","name":"New Version 1","archived":false,"released":false,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"06/Jul/10","projectId":10100}
Workaround
If you are trying to set to the archived or released field to true, you must use
PUT /rest/api/2/version/{id}
- duplicates
-
JDEV-36745 Loading...