How to update Custom Fields
Added by huy hoang 12 months ago
I want to use API. From external client update custom field. According to the documentation it looks like currently only GET is possible?
https://redmine.org/projects/redmine/wiki/Rest_CustomFields
in my case, i have data like this:
{ is_filter = true, regexp = , name = Custom Category, possible_values = [{ { value = A }, { value = B }, { value = C }], visible = true, is_required = true, id = 30.0, default_value = , customized_type = time_entry, field_format = list }
im about creat GAS to update new value = D automatically by some trigger. I can fetched .json data, but dont know how to Post/Put data back to server. Is it possible ?
Replies (3)
RE: How to update Custom Fields
-
Added by Holger Just 12 months ago
Currently, it is not possible to create or update custom field definitions via the API.
RE: How to update Custom Fields
-
Added by huy hoang 12 months ago
Holger Just wrote in RE: How to update Custom Fields:
Currently, it is not possible to create or update custom field definitions via the API.
Thanks, I thought so too.
RE: How to update Custom Fields
-
Added by Mayama Takeshi 12 months ago
At least for POST (create issue setting a custom field), something this should work:
{ "issue": { "custom_fields": { { id = CUSTOM_FIELD_ID, name = "CUSTOM_FIELD_NAME", value = "CUSTOM_FIELD_VALUE, }, }, tracker_id = TRACKER_ID, subject = "THE_SUBJECT", project_id = PROJECT_ID, description = "THE_DESCRIPTION" } }
(I know this works because it is used in my company callcenter integration with redmine).
I have not tested by I believe PUT should work too.
UPDATE: Ah, sorry, I realize now you want to create/update custom field definitions.