Actions
Defect #6561
closedcannot update notes as explained in REST API example
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2010-10-03
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
I try to update notes for issue 3888. I am using JSON only because there is an example with changing notes in Wiki: Rest_Issues.
I use curl:
curl -v -H "Content-Type:text.json" -X PUT --data "@/tmp/3888.json" -u evgeny:passwd http://redmine.komtex/issues/3888.json
File /tmp/3888.json contains:
{ "issue": { "subject": "subject123" }, "notes": "Changing the subject" }
In my redmine log I see:
Processing IssuesController#update to json (for 127.0.0.1 at 2010-10-03 08:51:24) [PUT] Parameters: {"format"=>"json", "action"=>"update", "id"=>"3888", "controller"=>"issues"} Completed in 49ms (View: 0, DB: 8) | 200 OK [http://localhost/issues/3888.json]
curl output is:
* About to connect() to redmine.komtex port 80 (#0) * Trying 10.1.90.220... connected * Connected to redmine.komtex (10.1.90.220) port 80 (#0) * Server auth using Basic with user 'evgeny' > PUT /issues/3888.json HTTP/1.1 > Authorization: Basic ZXZnZW55OmZvcl9yZWRtaW5l > User-Agent: curl/7.20.1 (i686-pc-linux-gnu) libcurl/7.20.1 OpenSSL/0.9.8n zlib/1.2.3 libidn/1.5 > Host: redmine.komtex > Accept: */* > Content-Type:text.json > Content-Length: 88 > < HTTP/1.1 200 OK < Server: nginx/0.7.65 < Date: Sun, 03 Oct 2010 04:51:24 GMT < Content-Type: application/json; charset=utf-8 < Connection: keep-alive < X-Runtime: 49 < Content-Length: 1 < Cache-Control: private, max-age=0, must-revalidate < Set-Cookie: _redmine_session=BAh7BjoPc2Vzc2lvbl9pZCIlYzQ1ZmUzNjUwNzRkNDJjMDgwZGFjOTk4MjZhOTU1ZWY%3D--12171959dac14b7ae676d5819806dccb1d2aead6; path=/; HttpOnly < * Connection #0 to host redmine.komtex left intact * Closing connection #0
Issue 3888 is left unschanged: it has old subject and no new notes. The only thing changed is the phrase: "Updated 1 minute ago".
mysql --version:
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1
ruby script/about fails because of:
/home/trac/redmine-1.0.2/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `real_connect': Access denied for user 'root'@'localhost' (using password: NO) (Mysql::Error)
Actions