Function: getFieldsPaginated()
ts
function getFieldsPaginated(
client,
parameters?,
options?
): Promise<{
[key: string]: unknown;
isLast: boolean;
maxResults: number;
nextPage?: string;
self?: string;
startAt: number;
total: number;
values: object[];
}>;Defined in: src/cloud/api/issueFields.ts:84
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
idandquery
Use type must be set to custom to show custom fields only.
Permissions required: Permission to access Jira.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters? | { expand?: | "key" | string & object | "searcherKey" | "contextsCount" | "isLocked" | "lastUsed" | "screensCount" | "stableId" | ( | "key" | string & object | "searcherKey" | "contextsCount" | "isLocked" | "lastUsed" | "screensCount" | "stableId")[]; id?: string[]; maxResults?: number; orderBy?: | "name" | string & object | "contextsCount" | "lastUsed" | "projectsCount" | "screensCount" | "-name" | "+name" | "-contextsCount" | "+contextsCount" | "-lastUsed" | "+lastUsed" | "-screensCount" | "+screensCount" | "-projectsCount" | "+projectsCount"; projectIds?: number[]; query?: string; startAt?: number; type?: ("custom" | string & object | "system")[]; } | - |
parameters.expand? | | "key" | string & object | "searcherKey" | "contextsCount" | "isLocked" | "lastUsed" | "screensCount" | "stableId" | ( | "key" | string & object | "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 |
parameters.id? | string[] | The IDs of the custom fields to return or, where query is specified, filter. |
parameters.maxResults? | number | The maximum number of items to return per page. |
parameters.orderBy? | | "name" | string & object | "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 |
parameters.projectIds? | 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 |
parameters.query? | string | String used to perform a case-insensitive partial match with field names or descriptions. |
parameters.startAt? | number | The index of the first item to return in a page of results (page offset). |
parameters.type? | ("custom" | string & object | "system")[] | The type of fields to search. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; isLast: boolean; maxResults: number; nextPage?: string; self?: string; startAt: number; total: number; values: object[]; }>