Skip to content

Function: updateFilter() ​

ts
function updateFilter(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  approximateLastUsed?: Date;
  description?: string;
  editPermissions?: object[];
  favourite?: boolean;
  favouritedCount?: number;
  id?: string;
  isWritable?: boolean;
  jql?: string;
  name: string;
  owner?: {
   [key: string]: unknown;
     accountId?: string;
     accountType?: "unknown" | string & object | "atlassian" | "app" | "customer";
     active?: boolean;
     applicationRoles?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     appType?: string;
     avatarUrls?: {
      [key: string]: unknown;
        16x16?: string;
        24x24?: string;
        32x32?: string;
        48x48?: string;
     };
     displayName?: string;
     emailAddress?: string;
     expand?: string;
     groups?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     guest?: boolean;
     locale?: string;
     self?: string;
     timeZone?: string;
  };
  searchUrl?: string;
  self?: string;
  sharedUsers?: {
   [key: string]: unknown;
     end-index?: number;
     items?: object[];
     max-results?: number;
     size?: number;
     start-index?: number;
  };
  sharePermissions?: object[];
  subscriptions?: {
   [key: string]: unknown;
     end-index?: number;
     items?: object[];
     max-results?: number;
     size?: number;
     start-index?: number;
  };
  viewUrl?: string;
}>;

Defined in: src/cloud/api/filters.ts:223

Updates a filter. Use this operation to update a filter's name, description, JQL, or sharing.

Permissions required: Permission to access Jira, however the user must own the filter.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ body: { approximateLastUsed?: unknown; description?: string; editPermissions?: object[]; favourite?: boolean; favouritedCount?: number; id?: string; isWritable?: boolean; jql?: string; name: string; owner?: { accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; appType?: string; avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string | null; expand?: string; groups?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; guest?: boolean; locale?: string | null; self?: string; timeZone?: string; }; searchUrl?: string; self?: string; sharedUsers?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; sharePermissions?: object[]; subscriptions?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; viewUrl?: string; }; expand?: | string & object | "sharedUsers" | "subscriptions" | (string & object | "sharedUsers" | "subscriptions")[]; id: number; overrideSharePermissions?: boolean; }-
parameters.body{ approximateLastUsed?: unknown; description?: string; editPermissions?: object[]; favourite?: boolean; favouritedCount?: number; id?: string; isWritable?: boolean; jql?: string; name: string; owner?: { accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; appType?: string; avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string | null; expand?: string; groups?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; guest?: boolean; locale?: string | null; self?: string; timeZone?: string; }; searchUrl?: string; self?: string; sharedUsers?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; sharePermissions?: object[]; subscriptions?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; viewUrl?: string; }-
parameters.body.approximateLastUsed?unknown[Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns null if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in real time and therefore may not be exactly accurate.
parameters.body.description?stringA description of the filter.
parameters.body.editPermissions?object[]The groups and projects that can edit the filter.
parameters.body.favourite?booleanWhether the filter is selected as a favorite.
parameters.body.favouritedCount?numberThe count of how many users have selected this filter as a favorite, including the filter owner.
parameters.body.id?stringThe unique identifier for the filter.
parameters.body.isWritable?boolean-
parameters.body.jql?stringThe JQL query for the filter. For example, project = SSP AND issuetype = Bug.
parameters.body.name?stringThe name of the filter. Must be unique.
parameters.body.owner?{ accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; appType?: string; avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string | null; expand?: string; groups?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; guest?: boolean; locale?: string | null; self?: string; timeZone?: string; }-
parameters.body.owner.accountId?stringThe account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required in requests.
parameters.body.owner.accountType?"unknown" | string & object | "atlassian" | "app" | "customer"The user account type. Can take the following values: - atlassian regular Atlassian user account - app system account used for Connect applications and OAuth to represent external systems - customer Jira Service Desk account representing an external service desk
parameters.body.owner.active?booleanWhether the user is active.
parameters.body.owner.applicationRoles?{ callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }-
parameters.body.owner.applicationRoles.callback?Record<string, never>-
parameters.body.owner.applicationRoles.items?object[]-
parameters.body.owner.applicationRoles.max-results?number-
parameters.body.owner.applicationRoles.pagingCallback?Record<string, never>-
parameters.body.owner.applicationRoles.size?number-
parameters.body.owner.appType?stringThe app type of the user account when accountType is 'app'. Can take the following values: - service Service Account - agent Rovo Agent Account - unknown Unknown app type
parameters.body.owner.avatarUrls?{ 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }-
parameters.body.owner.avatarUrls.16x16?stringThe URL of the item's 16x16 pixel avatar.
parameters.body.owner.avatarUrls.24x24?stringThe URL of the item's 24x24 pixel avatar.
parameters.body.owner.avatarUrls.32x32?stringThe URL of the item's 32x32 pixel avatar.
parameters.body.owner.avatarUrls.48x48?stringThe URL of the item's 48x48 pixel avatar.
parameters.body.owner.displayName?stringThe display name of the user. Depending on the user’s privacy setting, this may return an alternative value.
parameters.body.owner.emailAddress?string | nullThe email address of the user. Depending on the user’s privacy setting, this may be returned as null.
parameters.body.owner.expand?stringExpand options that include additional user details in the response.
parameters.body.owner.groups?{ callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }-
parameters.body.owner.groups.callback?Record<string, never>-
parameters.body.owner.groups.items?object[]-
parameters.body.owner.groups.max-results?number-
parameters.body.owner.groups.pagingCallback?Record<string, never>-
parameters.body.owner.groups.size?number-
parameters.body.owner.guest?booleanWhether the user is a guest.
parameters.body.owner.locale?string | nullThe locale of the user. Depending on the user’s privacy setting, this may be returned as null.
parameters.body.owner.self?stringThe URL of the user.
parameters.body.owner.timeZone?stringThe time zone specified in the user's profile. If the user's time zone is not visible to the current user (due to user's profile setting), or if a time zone has not been set, the instance's default time zone will be returned.
parameters.body.searchUrl?stringA URL to view the filter results in Jira, using the Search for issues using JQL operation with the filter's JQL string to return the filter results. For example, _https://your-domain.atlassian.net/rest/api/3/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug_.
parameters.body.self?stringThe URL of the filter.
parameters.body.sharedUsers?{ end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }-
parameters.body.sharedUsers.end-index?numberThe index of the last item returned on the page.
parameters.body.sharedUsers.items?object[]The list of items.
parameters.body.sharedUsers.max-results?numberThe maximum number of results that could be on the page.
parameters.body.sharedUsers.size?numberThe number of items on the page.
parameters.body.sharedUsers.start-index?numberThe index of the first item returned on the page.
parameters.body.sharePermissions?object[]The groups and projects that the filter is shared with.
parameters.body.subscriptions?{ end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }-
parameters.body.subscriptions.end-index?numberThe index of the last item returned on the page.
parameters.body.subscriptions.items?object[]The list of items.
parameters.body.subscriptions.max-results?numberThe maximum number of results that could be on the page.
parameters.body.subscriptions.size?numberThe number of items on the page.
parameters.body.subscriptions.start-index?numberThe index of the first item returned on the page.
parameters.body.viewUrl?stringA URL to view the filter results in Jira, using the ID of the filter. For example, _https://your-domain.atlassian.net/issues/?filter=10100_.
parameters.expand?| string & object | "sharedUsers" | "subscriptions" | (string & object | "sharedUsers" | "subscriptions")[]Use expand to include additional information about filter in the response. This parameter accepts a comma-separated list. Expand options include: - sharedUsers Returns the users that the filter is shared with. This includes users that can browse projects that the filter is shared with. If you don't specify sharedUsers, then the sharedUsers object is returned but it doesn't list any users. The list of users returned is limited to 1000, to access additional users append [start-index:end-index] to the expand request. For example, to access the next 1000 users, use ?expand=sharedUsers[1001:2000]. - subscriptions Returns the users that are subscribed to the filter. If you don't specify subscriptions, the subscriptions object is returned but it doesn't list any subscriptions. The list of subscriptions returned is limited to 1000, to access additional subscriptions append [start-index:end-index] to the expand request. For example, to access the next 1000 subscriptions, use ?expand=subscriptions[1001:2000].
parameters.id?numberThe ID of the filter to update.
parameters.overrideSharePermissions?booleanEXPERIMENTAL: Whether share permissions are overridden to enable the addition of any share permissions to filters. Available to users with Administer Jira global permission.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; approximateLastUsed?: Date; description?: string; editPermissions?: object[]; favourite?: boolean; favouritedCount?: number; id?: string; isWritable?: boolean; jql?: string; name: string; owner?: { [key: string]: unknown; accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; appType?: string; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string; expand?: string; groups?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; guest?: boolean; locale?: string; self?: string; timeZone?: string; }; searchUrl?: string; self?: string; sharedUsers?: { [key: string]: unknown; end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; sharePermissions?: object[]; subscriptions?: { [key: string]: unknown; end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; viewUrl?: string; }>