Actions
Defect #20119
closedREST API: setting project_id in issue not accepted in Redmine 3.0.3
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Duplicate
Affected version:
Description
Hi all,
I hope this is a mistake on my side but as far as I understand this might also be a bug in redmine.
If I try to post a new issue via the api to https://myredmine/issues.json I would use the following payload according to the documentation (http://www.redmine.org/projects/redmine/wiki/Rest_Issues):
{"issue": { "subject": "Test subject", "project_id": "myProject", "description": "foobar" } }
Redmine now does not create the ticket but responses with a 422 and
{"errors":["Project cannot be blank","Tracker cannot be blank","Status cannot be blank"]}
After some testing I found a working payload:
{"issue": { "subject": "Test subject", "description": "foobar" }, "project_id": "myProject" }
My Environment:
Environment: Redmine version 3.0.3.stable Ruby version 2.1.2-p95 (2014-05-08) [x86_64-linux] Rails version 4.2.1 Environment production Database adapter Mysql2
The issue does not show up on a 2.5.1 installation (both payloads work flawless):
Environment: Redmine version 2.5.1.stable Ruby version 1.9.3-p194 (2012-04-20) [i486-linux] Rails version 3.2.6 Environment production Database adapter Mysql2
Related issues
Actions