updateCustomFieldOption method

Future<CustomFieldUpdatedContextOptionsList> updateCustomFieldOption({
  1. required String fieldId,
  2. required int contextId,
  3. required BulkCustomFieldOptionUpdateRequest body,
})

Updates the options of a custom field.

If any of the options are not found, no options are updated. Options where the values in the request match the current values aren't updated and aren't reported in the response.

Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.

Permissions required: Administer Jira global permission.

Implementation

Future<CustomFieldUpdatedContextOptionsList> updateCustomFieldOption(
    {required String fieldId,
    required int contextId,
    required BulkCustomFieldOptionUpdateRequest body}) async {
  return CustomFieldUpdatedContextOptionsList.fromJson(await _client.send(
    'put',
    'rest/api/3/field/{fieldId}/context/{contextId}/option',
    pathParameters: {
      'fieldId': fieldId,
      'contextId': '$contextId',
    },
    body: body.toJson(),
  ));
}