jira.js
    Preparing search index...

    Function getContextDefaultValues

    • Returns a paginated list of default values grouped by custom field context.

      Each returned ContextDefaultValuesBean has a contextId and a defaultValues list of IssueTypeDefaultValueBean entries - one per issue-type-scoped default value configured for the context. An entry with "isAnyIssueType": true represents the catch-all default that applies to every issue type covered by the context that is not covered by a more specific entry; a non-null issueTypeId represents a default that only applies to that issue type.

      For contexts that have not been converted to the multiple-contexts data model, exactly one entry is returned per context with isAnyIssueType=true. For converted contexts, one entry is returned per configured per-issue-type default.

      The value object on each entry is the same polymorphic CustomFieldContextDefaultValueBean exposed by the deprecated GET /defaultValue endpoint - its concrete subtype depends on the custom field's type (see the list of supported types on that endpoint).

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            contextId?: number[];
            fieldId: string;
            issueTypeId?: string[];
            maxResults?: number;
            startAt?: number;
        }
        • OptionalcontextId?: number[]

          The IDs of the contexts to return default values for. If omitted, default values for every context the custom field has are returned.

        • fieldId: string

          The ID of the custom field, for example customfield\_10000.

        • OptionalissueTypeId?: string[]

          The IDs of the issue types to restrict the returned per-issue-type default values to. If omitted, default values for every issue type are returned. This filter never removes the catch-all isAnyIssueType entry of a context.

        • OptionalmaxResults?: number

          The maximum number of items to return per page.

        • OptionalstartAt?: number

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

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              isLast: boolean;
              maxResults: number;
              nextPage?: string;
              self?: string;
              startAt: number;
              total: number;
              values: {
                  contextId: number;
                  defaultValues?: {
                      isAnyIssueType?: boolean
                      | null;
                      issueTypeId?: string | null;
                      value?:
                          | {
                              cascadingOptionId?: string;
                              contextId: string;
                              optionId: string;
                              type: "option.cascading";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              optionIds: string[];
                              type: "option.multiple";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              optionId: string;
                              type: "option.single";
                              [key: string]: unknown;
                          }
                          | {
                              accountId: string;
                              contextId: string;
                              type: "single.user.select";
                              userFilter: {
                                  enabled: boolean;
                                  groups?: (...)
                                  | (...);
                                  roleIds?: (...) | (...);
                                  [key: string]: unknown;
                              };
                              [key: string]: unknown;
                          }
                          | {
                              accountIds: string[];
                              contextId: string;
                              type: "multi.user.select";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              groupId: string;
                              type: "grouppicker.single";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              groupIds: string[];
                              type: "grouppicker.multiple";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              date?: string;
                              type: "datepicker";
                              useCurrent?: boolean;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              dateTime?: string;
                              type: "datetimepicker";
                              useCurrent?: boolean;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              type: "url";
                              url: string;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              projectId: string;
                              type: "project";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              number: number;
                              type: "float";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              labels: string[];
                              type: "labels";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              text?: string;
                              type: "textfield";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              text?: string;
                              type: "textarea";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              text?: string;
                              type: "readonly";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              type: "version.single";
                              versionId: string;
                              versionOrder?: string;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              type: "version.multiple";
                              versionIds: string[];
                              versionOrder?: string;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              text?: string;
                              type: "forge.string";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              type: "forge.string.list";
                              values?: (...)[];
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              object?: Record<(...), (...)>;
                              type: "forge.object";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              dateTime?: string;
                              type: "forge.datetime";
                              useCurrent?: boolean;
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              groupId: string;
                              type: "forge.group";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              groupIds: string[];
                              type: "forge.group.list";
                              [key: string]: unknown;
                          }
                          | {
                              contextId: string;
                              number: number;
                              type: "forge.number";
                              [key: string]: unknown;
                          }
                          | {
                              accountId: string;
                              contextId: string;
                              type: "forge.user";
                              userFilter: {
                                  enabled: boolean;
                                  groups?: (...)
                                  | (...);
                                  roleIds?: (...) | (...);
                                  [key: string]: unknown;
                              };
                              [key: string]: unknown;
                          }
                          | {
                              accountIds: string[];
                              contextId: string;
                              type: "forge.user.list";
                              [key: string]: unknown;
                          };
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >