ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

REST JSON API creating issue with custom date field

Added by Hans Maulwurf at 2013-03-08 01:26 pm

Hey,

I try to create an issue with a custom date field, other custom fields work, but I don't know how to do it with a date field. When I read an issue, it says { "value":"2013-02-13", "name":"Start", "id":6 } but when I POST it like that, it says custom_values invalid. Why? I found nowhere an example or a hint :/


Replies (2)

RE: REST JSON API creating issue with custom date field - Added by Felix Schäfer at 2013-03-08 03:44 pm

I haven't looked it up, but IIRC custom fields have to be submitted as a hash of $ID: $VALUE, so something like {6: "2013-02-13"}. Have a look at the issue creation form though, the json API should behave quite similarly to the form with regard to parameters.

RE: REST JSON API creating issue with custom date field - Added by Hans Maulwurf at 2013-03-08 10:36 pm

Inside the "custom_fields"? This doesn't seem to work. "2013-11-24" is always converted to "Sun, 24 Nov 2013". When I use {6: "2013-11-24"} the custom field with id 6 is not set, it is empty. Seems to be the same problem like here http://www.redmine.org/issues/13133

(1-2/2)