This resource represents custom issue field select list options created in Jira or using the REST API. This resource supports the following field types:

  • Checkboxes.
  • Radio Buttons.
  • Select List (single choice).
  • Select List (multiple choices).
  • Select List (cascading).

See Issue custom field options (apps) to manipulate custom issue field select list options created by a Connect app.

Use it to retrieve, create, update, order, and delete custom field options.

Hierarchy

  • CommonHttpService
    • IssueCustomFieldOptionsService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns IssueCustomFieldOptionsService

Methods

  • Returns a custom field option. For example, an option in a select list.

    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.

    This operation can be accessed anonymously.

    Permissions required: The custom field option is returned as follows:

    • if the user has the Administer Jira global permission.
    • if the user has the Browse projects project permission for at least one project the custom field is used in, and the field is visible in at least one layout the user has permission to view.

    Parameters

    • params: {
          id: string;
      }
      • id: string

        The ID of the custom field option.

    Returns Promise<CustomFieldOption>

    Returned if the request is successful.

    example:

    {
    "self": "https://your-domain.atlassian.net/rest/api/3/customFieldOption/10000",
    "value": "To Do"
    }

    GET /rest/api/3/customFieldOption/{id} @scopes-current read:jira-work @scopes-beta read:field:jira, read:field.option:jira

  • Returns a paginated list of all custom field option for a context. Options are returned first then cascading options, in the order they display in Jira.

    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.

    Parameters

    • params: {
          contextId: number;
          fieldId: string;
          maxResults?: number;
          onlyOptions?: boolean;
          optionId?: number;
          startAt?: number;
      }
      • contextId: number

        The ID of the context.

      • fieldId: string

        The ID of the custom field.

      • OptionalmaxResults?: number

        The maximum number of items to return per page.

      • OptionalonlyOptions?: boolean

        Whether only options are returned.

      • OptionaloptionId?: number

        The ID of the option.

      • OptionalstartAt?: number

        The index of the first item to return in a page of results (page offset).

    Returns Promise<PageBeanCustomFieldContextOption>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 100,
    "startAt": 0,
    "total": 4,
    "values": [
    {
    "id": "10001",
    "value": "New York"
    },
    {
    "id": "10002",
    "value": "Boston",
    "disabled": true
    },
    {
    "id": "10004",
    "value": "Denver"
    },
    {
    "id": "10003",
    "value": "Brooklyn",
    "optionId": "10001"
    }
    ]
    }

    GET /rest/api/3/field/{fieldId}/context/{contextId}/option @scopes-current manage:jira-configuration @scopes-beta read:field.option:jira

  • Replaces the options of a custom field.

    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 or Forge apps.

    Permissions required: Administer Jira global permission.

    Parameters

    • params: {
          contextId: number;
          fieldId: string;
          jql?: string;
          optionId: number;
          replaceWith?: number;
      }
      • contextId: number

        The ID of the context.

      • fieldId: string

        The ID of the custom field.

      • Optionaljql?: string

        A JQL query that specifies the issues to be updated. For example, project=10000.

      • optionId: number

        The ID of the option to be deselected.

      • OptionalreplaceWith?: number

        The ID of the option that will replace the currently selected option.

    Returns Promise<void>

    DELETE /rest/api/3/field/{fieldId}/context/{contextId}/option/{optionId}/issue @scopes-current manage:jira-configuration @scopes-beta read:field.option:jira, write:field.option:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void