Project

General

Profile

Actions

Defect #6561

closed

cannot update notes as explained in REST API example

Added by Evgeny Ratnikov over 14 years ago. Updated about 8 years ago.

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 #1

Updated by Eric Davis over 14 years ago

  • Status changed from New to 7
  • Assignee set to Eric Davis

I'm going to look into the issues and projects APIs soon. I've heard a lot of reports that it's not working properly.

Actions #2

Updated by Eric Davis over 14 years ago

  • Assignee deleted (Eric Davis)

I am stepping down from working on Redmine. If someone else is interesting in working on this issue, feel free to reassign it to them.

Eric Davis

Actions #3

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from 7 to Closed
  • Resolution set to Invalid

Eric Davis wrote:

I'm going to look into the issues and projects APIs soon. I've heard a lot of reports that it's not working properly.

Well, the application log above shows that the problem is not on the API side. Params are not recognized by Rails.

Evgeny, use -H "Content-Type:application/json" and it will work much better.

Actions #4

Updated by gourav swarnkar almost 13 years ago

Guys, any work around for this issue.
Please update.

Actions #5

Updated by gourav swarnkar almost 13 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Azamat Hackimov

Guys Please help me I am in big trouble.
Any fix for the notes updation.

Actions #6

Updated by Etienne Massip almost 13 years ago

  • Status changed from Reopened to Closed
  • Assignee deleted (Azamat Hackimov)

This is not an actual issue; once Content-Type:application/json fixed, the command passed.

Actions #7

Updated by Fazil Vadakkumpadath about 8 years ago

May be you should move "notes" into "issue" block.

Actions

Also available in: Atom PDF