How to add a tracker to a project using REST api?
Added by Claudio Fleiner over 10 years ago
Hi,
I can easily create a project using the python library. However, such a project has no tracker enabled, and so far I see no way to add one using python. I tried to use a PUT request using this XML file:
<project>
<trackers type="array">
<tracker id="1" name="Bug"/>
<tracker id="2" name="Feature"/>
</trackers>
</project>
to redmine/projects/16.xml
(16 is the project ID I'd like to update).
This returns
<body>
<h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br />
If you continue to experience problems please contact your Redmine administrator for assistance.</p>
<p>If you are the Redmine administrator, check your log files for details about the error.</p>
<p><a href="javascript:history.back()">Back</a></p>
</body>
and the log files show:
Completed 500 Internal Server Error in 103.4ms
NoMethodError (undefined method `has_key?' for nil:NilClass):
app/controllers/projects_controller.rb:183:in `update'
Any suggestions on how to do this correctly?
thanks a lot!
Claudio
Replies (1)
RE: How to add a tracker to a project using REST api? - Added by Justin MASSIOT over 9 years ago
Hi Claudio,
Did you solve your problem? I am facing the same issue...
Would be great if you could help me!
Thanks.
EDIT
I am with Redmine 2.4.2.stable on Ubuntu 14.04
Environment: Redmine version 2.4.2.stable Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux] Rails version 3.2.16 Environment production Database adapter SQLite