Project

General

Profile

[solved] Cannot update custom field values with json api

Added by Christophe de Vienne over 11 years ago

Hi,

I cannot find a way to update a custom field value using the json api.

The data I PUT to the /issues/ID.json follows the documentation (http://www.redmine.org/projects/redmine/wiki/Rest_api) :

{"issue": {"notes": "test", "custom_fields": [{"id": 39, "value": "NOT Stable"}]}}

The note is correctly added to the ticket, but the custom field value is ignored.
In the server logs I see:

Processing by IssuesController#update as JSON
  Parameters: {"id"=>"9745", "key"=>"a75efbb3eff2cc3c98a0ccc8d65913fbeaeb3337", "issue"=>{"custom_fields"=>[{"id"=>39, "value"=>"NOT Stable"}], "notes"=>"test"}}

I also tried using :

"custom_field_values": {"39": "NOT Stable"}

with no more luck.

I don't know if it is a bug or something I do wrong, but in the absence of error from redmine I have no idea what to do next.

Redmine version: 2.0.3

Thanks,

Christophe


Replies (1)

RE: Cannot update custom field values with json api - Added by Christophe de Vienne over 11 years ago

Sorry to answer myself but I found the problem.

The user doing the update was not granted the 'edit issue' right, only "add note".

The absence of message both in the reply and the server logs did not help...

Christophe

    (1-1/1)