updateIssueFieldOption method

Future<IssueFieldOption> updateIssueFieldOption({
  1. required String fieldKey,
  2. required int optionId,
  3. required IssueFieldOption body,
})

Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical.

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

Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Implementation

Future<IssueFieldOption> updateIssueFieldOption(
    {required String fieldKey,
    required int optionId,
    required IssueFieldOption body}) async {
  return IssueFieldOption.fromJson(await _client.send(
    'put',
    'rest/api/3/field/{fieldKey}/option/{optionId}',
    pathParameters: {
      'fieldKey': fieldKey,
      'optionId': '$optionId',
    },
    body: body.toJson(),
  ));
}