Error updating enumeration custom field via rest api

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
ninja-tester
Posts: 6
Joined: 05 Jul 2017, 08:31
Location: Russia\Samara
Contact:

Error updating enumeration custom field via rest api

Post by ninja-tester »

I'm trying to update an issue with an enumeration type custom filed and get the error:

Code: Select all

Response{protocol=http/1.1, code=400, message=Invalid value for custom field 'Субъект РФ', url=http://localhost/api/rest/issues/24579}
When I updating other custom fields (not an enumaration, but usual text fields) it works fine.
How to update enumeration custom fileds values via rest api?

Sending data has that format:

Code: Select all

 \"custom_fields\":\n  [\n {\n \"field\": {\n \"id\":\"30\"\n  },{\n \"name\":\"Субъект РФ\"\n },\n\"value\": \"16 Республика Татарстан (Татарстан)\"\n    }\n  ] 
MantisBT Version 2.13.0
Schema Version 209
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error updating enumeration custom field via rest api

Post by atrol »

I have no time to have a deeper look at this, but I recommend to upgrade Mantis to 2.15.0 as we fixed some REST API related bugs since 2.13.0.
Please use Search before posting and read the Manual
Post Reply