jira.js
    Preparing search index...

    Function getFieldsPaginated

    • Returns a paginated list of fields for Classic Jira projects. The list can include:

      • All fields
      • Specific fields, by defining id
      • Fields that contain a string in the field name or description, by defining query
      • Specific fields that contain a string in the field name or description, by defining id and query

      Use type must be set to custom to show custom fields only.

      Permissions required: Permission to access Jira.

      Parameters

      • client: Client
      • Optionalparameters: {
            expand?:
                | string
                | string[]
                | string & {}
                | (
                    | "key"
                    | string & {}
                    | "searcherKey"
                    | "contextsCount"
                    | "isLocked"
                    | "lastUsed"
                    | "screensCount"
                    | "stableId"
                )[];
            id?: string[];
            maxResults?: number;
            orderBy?: | "name"
            | string & {}
            | "contextsCount"
            | "lastUsed"
            | "projectsCount"
            | "screensCount"
            | "-name"
            | "+name"
            | "-contextsCount"
            | "+contextsCount"
            | "-lastUsed"
            | "+lastUsed"
            | "-screensCount"
            | "+screensCount"
            | "-projectsCount"
            | "+projectsCount";
            projectIds?: number[];
            query?: string;
            startAt?: number;
            type?: ("custom" | string & {} | "system")[];
        }
        • Optionalexpand?:
              | string
              | string[]
              | string & {}
              | (
                  | "key"
                  | string & {}
                  | "searcherKey"
                  | "contextsCount"
                  | "isLocked"
                  | "lastUsed"
                  | "screensCount"
                  | "stableId"
              )[]

          Use expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:

          • key returns the key for each field
          • stableId returns the stableId for each field
          • lastUsed returns the date when the value of the field last changed
          • screensCount returns the number of screens related to a field
          • contextsCount returns the number of contexts related to a field
          • isLocked returns information about whether the field is locked
          • searcherKey returns the searcher key for each custom field
        • Optionalid?: string[]

          The IDs of the custom fields to return or, where query is specified, filter.

        • OptionalmaxResults?: number

          The maximum number of items to return per page.

        • OptionalorderBy?:
              | "name"
              | string & {}
              | "contextsCount"
              | "lastUsed"
              | "projectsCount"
              | "screensCount"
              | "-name"
              | "+name"
              | "-contextsCount"
              | "+contextsCount"
              | "-lastUsed"
              | "+lastUsed"
              | "-screensCount"
              | "+screensCount"
              | "-projectsCount"
              | "+projectsCount"

          Order the results by:

          • contextsCount sorts by the number of contexts related to a field
          • lastUsed sorts by the date when the value of the field last changed
          • name sorts by the field name
          • screensCount sorts by the number of screens related to a field
        • OptionalprojectIds?: number[]

          The IDs of the projects to filter the fields by. Fields belonging to project Ids that the user does not have access to will not be returned

        • Optionalquery?: string

          String used to perform a case-insensitive partial match with field names or descriptions.

        • OptionalstartAt?: number

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

        • Optionaltype?: ("custom" | string & {} | "system")[]

          The type of fields to search.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              isLast: boolean;
              maxResults: number;
              nextPage?: string;
              self?: string;
              startAt: number;
              total: number;
              values: {
                  areOptionsSupported?: boolean;
                  contextsCount?: number;
                  description?: string;
                  id: string;
                  isLocked?: boolean;
                  isOptionsCountOverLimit?: boolean;
                  isUnscreenable?: boolean;
                  key?: string;
                  lastUsed?: {
                      type?: string & {}
                      | "TRACKED"
                      | "NOT_TRACKED"
                      | "NO_INFORMATION";
                      value?: Date;
                      [key: string]: unknown;
                  };
                  name: string;
                  projectsCount?: number;
                  schema: {
                      configuration?: Record<string, any>;
                      custom?: string;
                      customId?: number;
                      items?: string;
                      system?: string;
                      type: string;
                      [key: string]: unknown;
                  };
                  screensCount?: number;
                  searcherKey?: string;
                  stableId?: string;
                  translatedDescription?: string;
                  translatedName?: string;
                  typeDisplayName?: string;
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >