Error updating enumeration custom field via rest api

General discussion of Mantis.

Moderators: Developer, Contributor

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

Error updating enumeration custom field via rest api

Post by ninja-tester » Jun 06, 2018 3:02 am

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: 7647
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Error updating enumeration custom field via rest api

Post by atrol » Jun 06, 2018 3:58 am

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