jira.js
    Preparing search index...

    Function assignIssue

    • Assigns an issue to a user. Use this operation when the calling user does not have the Edit Issues permission but has the Assign issue permission for the project that the issue is in.

      If name or accountId is set to:

      • "-1", the issue is assigned to the default assignee for the project.
      • null, the issue is set to unassigned.

      This operation can be accessed anonymously.

      Permissions required:

      Parameters

      • client: Client
      • parameters: {
            accountId?: string;
            accountType?: "unknown" | string & {} | "atlassian" | "app" | "customer";
            active?: boolean;
            applicationRoles?: {
                callback?: { [key: string]: unknown };
                items?: {
                    defaultGroups?: string[];
                    defaultGroupsDetails?: {
                        groupId?: string | null;
                        name?: string;
                        self?: string;
                        [key: string]: unknown;
                    }[];
                    defined?: boolean;
                    groupDetails?: {
                        groupId?: string
                        | null;
                        name?: string;
                        self?: string;
                        [key: string]: unknown;
                    }[];
                    groups?: string[];
                    hasUnlimitedSeats?: boolean;
                    key?: string;
                    name?: string;
                    numberOfSeats?: number;
                    platform?: boolean;
                    remainingSeats?: number;
                    selectedByDefault?: boolean;
                    userCount?: number;
                    userCountDescription?: string;
                    [key: string]: unknown;
                }[];
                "max-results"?: number;
                pagingCallback?: { [key: string]: unknown };
                size?: number;
                [key: string]: unknown;
            };
            appType?: string;
            avatarUrls?: {
                "16x16"?: string;
                "24x24"?: string;
                "32x32"?: string;
                "48x48"?: string;
                [key: string]: unknown;
            };
            displayName?: string;
            emailAddress?: string;
            expand?: string;
            groups?: {
                callback?: { [key: string]: unknown };
                items?: {
                    groupId?: string | null;
                    name?: string;
                    self?: string;
                    [key: string]: unknown;
                }[];
                "max-results"?: number;
                pagingCallback?: { [key: string]: unknown };
                size?: number;
                [key: string]: unknown;
            };
            guest?: boolean;
            issueIdOrKey: string;
            locale?: string;
            self?: string;
            timeZone?: string;
        }
        • OptionalaccountId?: string

          The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required in requests.

        • OptionalaccountType?: "unknown" | string & {} | "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
        • Optionalactive?: boolean

          Whether the user is active.

        • OptionalapplicationRoles?: {
              callback?: { [key: string]: unknown };
              items?: {
                  defaultGroups?: string[];
                  defaultGroupsDetails?: {
                      groupId?: string | null;
                      name?: string;
                      self?: string;
                      [key: string]: unknown;
                  }[];
                  defined?: boolean;
                  groupDetails?: {
                      groupId?: string
                      | null;
                      name?: string;
                      self?: string;
                      [key: string]: unknown;
                  }[];
                  groups?: string[];
                  hasUnlimitedSeats?: boolean;
                  key?: string;
                  name?: string;
                  numberOfSeats?: number;
                  platform?: boolean;
                  remainingSeats?: number;
                  selectedByDefault?: boolean;
                  userCount?: number;
                  userCountDescription?: string;
                  [key: string]: unknown;
              }[];
              "max-results"?: number;
              pagingCallback?: { [key: string]: unknown };
              size?: number;
              [key: string]: unknown;
          }
        • OptionalappType?: string

          The 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
        • OptionalavatarUrls?: {
              "16x16"?: string;
              "24x24"?: string;
              "32x32"?: string;
              "48x48"?: string;
              [key: string]: unknown;
          }
          • Optional16x16?: string

            The URL of the item's 16x16 pixel avatar.

          • Optional24x24?: string

            The URL of the item's 24x24 pixel avatar.

          • Optional32x32?: string

            The URL of the item's 32x32 pixel avatar.

          • Optional48x48?: string

            The URL of the item's 48x48 pixel avatar.

        • OptionaldisplayName?: string

          The display name of the user. Depending on the user’s privacy setting, this may return an alternative value.

        • OptionalemailAddress?: string

          The email address of the user. Depending on the user’s privacy setting, this may be returned as null.

        • Optionalexpand?: string

          Expand options that include additional user details in the response.

        • Optionalgroups?: {
              callback?: { [key: string]: unknown };
              items?: {
                  groupId?: string | null;
                  name?: string;
                  self?: string;
                  [key: string]: unknown;
              }[];
              "max-results"?: number;
              pagingCallback?: { [key: string]: unknown };
              size?: number;
              [key: string]: unknown;
          }
        • Optionalguest?: boolean

          Whether the user is a guest.

        • issueIdOrKey: string

          The ID or key of the issue to be assigned.

        • Optionallocale?: string

          The locale of the user. Depending on the user’s privacy setting, this may be returned as null.

        • Optionalself?: string

          The URL of the user.

        • OptionaltimeZone?: string

          The 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.

      • Optionaloptions: RequestOptions

      Returns Promise<void>