createCustomFieldOption method
Future<CustomFieldCreatedContextOptionsList>
createCustomFieldOption({
- required String fieldId,
- required int contextId,
- required BulkCustomFieldOptionCreateRequest body,
Creates options and, where the custom select field is of the type Select List (cascading), cascading options for a custom select field. The options are added to a context of the field.
The maximum number of options that can be created per request is 1000 and each field can have a maximum of 10000 options.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
Implementation
Future<CustomFieldCreatedContextOptionsList> createCustomFieldOption(
{required String fieldId,
required int contextId,
required BulkCustomFieldOptionCreateRequest body}) async {
return CustomFieldCreatedContextOptionsList.fromJson(await _client.send(
'post',
'rest/api/3/field/{fieldId}/context/{contextId}/option',
pathParameters: {
'fieldId': fieldId,
'contextId': '$contextId',
},
body: body.toJson(),
));
}