jira.js
    Preparing search index...

    Function getComments

    • Returns all comments for an issue.

      This operation can be accessed anonymously.

      Permissions required: Comments are included in the response where the user has:

      • Browse projects project permission for the project containing the comment.
      • If issue-level security is configured, issue-level security permission to view the issue.
      • If the comment has visibility restrictions, belongs to the group or has the role visibility is role visibility is restricted to.

      Parameters

      • client: Client
      • parameters: {
            expand?:
                | string
                | string[]
                | string & {}
                | (string & {} | "renderedBody")[];
            issueIdOrKey: string;
            maxResults?: number;
            orderBy?: string & {} | "created" | "-created" | "+created";
            startAt?: number;
        }
        • Optionalexpand?: string | string[] | string & {} | (string & {} | "renderedBody")[]

          Use expand to include additional information about comments in the response. This parameter accepts renderedBody, which returns the comment body rendered in HTML.

        • issueIdOrKey: string

          The ID or key of the issue.

        • OptionalmaxResults?: number

          The maximum number of items to return per page.

        • OptionalorderBy?: string & {} | "created" | "-created" | "+created"

          Order the results by a field. Accepts created to sort comments by their created date.

        • OptionalstartAt?: number

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

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              comments?: {
                  author?: {
                      accountId?: string;
                      accountType?: string;
                      active?: boolean;
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      displayName?: string;
                      emailAddress?: string;
                      self?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  body?: {
                      content: Record<string, any>[];
                      type: string & {} | "doc";
                      version: number;
                      [key: string]: unknown;
                  };
                  created?: Date;
                  id?: string;
                  jsdAuthorCanSeeRequest?: boolean;
                  jsdPublic?: boolean;
                  properties?: { key?: string; value?: unknown; [key: string]: unknown }[];
                  renderedBody?: string;
                  self?: string;
                  updateAuthor?: {
                      accountId?: string;
                      accountType?: string;
                      active?: boolean;
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      displayName?: string;
                      emailAddress?: string;
                      self?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  updated?: Date;
                  visibility?: {
                      identifier?: string
                      | null;
                      type?: "role" | "group" | string & {};
                      value?: string;
                      [key: string]: unknown;
                  };
                  [key: string]: unknown;
              }[];
              maxResults?: number;
              startAt?: number;
              total?: number;
              [key: string]: unknown;
          },
      >