Vote #71993
完了REST API - custom fields in POST/PUT ignored for time_entries
0%
説明
About your application's environment Ruby version 1.9.3 (x86_64-linux) RubyGems version 1.8.22 Rack version 1.1.3 Rails version 2.3.14 Active Record version 2.3.14 Active Resource version 2.3.14 Action Mailer version 2.3.14 Active Support version 2.3.14 Database adapter mysql2 Database schema version 20120301153455 About your Redmine plugins Environmnet CSS 0.1
Additional Information:
- your database manager version: MySQL 5.1.61
- your Redmine version: 1.4.1
Problem:
When using the REST API to create or modify time_entries, custom_fields are ignored if using XML format. When I use JSON, it succeeds (but only if using some different structure than the one described on the WIKI page http://www.redmine.org/projects/redmine/wiki/Rest_api )
I tried all of the following XML structures:
- The one described on the WIKI page:
changed via XML PUT - 1 1131 - But also all of the following (the last one is no valid XML but I tried it anyway)
changed via XML PUT - 2 1132
<4>11344>
If I use JSON it succeeds with the following format:
{"time_entry": { "comments":"changed via JSON PUT - 2", "custom_field_values": { "4":"13:02" } } }
- If using the suggested format from the WIKI page, it does not work:
{"time_entry": { "comments":"changed via JSON PUT - 1", "custom_fields": [ {"value":"13:01","id":4} ] } }
Very interesting is, that XML POST/PUT with the documented format (WIKI page) works for issues!
So this succeeds:
changed via XML PUT 0
journals
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Fixed in r9783.
--------------------------------------------------------------------------------
Merged in 1.4-stable and 2.0-stable.
--------------------------------------------------------------------------------