jira.js
    Preparing search index...

    Function getRequestComments

    • This method returns all comments on a customer request. No permissions error is provided if, for example, the user doesn't have access to the service desk or request, the method simply returns an empty response.

      Permissions required: Permission to view the customer request.

      Response limitations: Customers are returned public comments only.

      Parameters

      • client: Client
      • parameters: {
            expand?: string[];
            internal?: boolean;
            issueIdOrKey: string;
            limit?: number;
            public?: boolean;
            start?: number;
        }
        • Optionalexpand?: string[]

          A multi-value parameter indicating which properties of the comment to expand:

          • attachment returns the attachment details, if any, for each comment. (If you want to get all attachments for a request, use servicedeskapi/request/{issueIdOrKey}/attachment.)
          • renderedBody (Experimental) returns the rendered body in HTML format (in addition to the raw body) for each comment.
        • Optionalinternal?: boolean

          Specifies whether to return internal comments or not. Default: true.

        • issueIdOrKey: string

          The ID or key of the customer request whose comments will be retrieved.

        • Optionallimit?: number

          The maximum number of comments to return per page. Default: 50. See the Pagination section for more details.

        • Optionalpublic?: boolean

          Specifies whether to return public comments or not. Default: true.

        • Optionalstart?: number

          The starting index of the returned comments. Base index: 0. See the Pagination section for more details.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              _expands?: string[];
              _links?: {
                  base?: string;
                  context?: string;
                  next?: string;
                  prev?: string;
                  self?: string;
                  [key: string]: unknown;
              };
              isLastPage?: boolean;
              limit?: number;
              size?: number;
              start?: number;
              values?: {
                  _expands?: string[];
                  _links?: { self?: string; [key: string]: unknown };
                  attachments?: {
                      _expands?: string[];
                      _links?: {
                          base?: string;
                          context?: string;
                          next?: string;
                          prev?: string;
                          self?: string;
                          [key: string]: unknown;
                      };
                      isLastPage?: boolean;
                      limit?: number;
                      size?: number;
                      start?: number;
                      values?: {
                          _links?: (...)
                          | (...);
                          author?: (...) | (...);
                          created?: (...) | (...);
                          filename?: (...) | (...);
                          mimeType?: (...) | (...);
                          size?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  };
                  author?: {
                      _links?: {
                          avatarUrls?: Record<(...), (...)>;
                          jiraRest?: string;
                          self?: string;
                          [key: string]: unknown;
                      };
                      accountId?: string;
                      active?: boolean;
                      displayName?: string;
                      emailAddress?: string;
                      key?: string;
                      name?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  body?: string;
                  created?: {
                      epochMillis?: number;
                      friendly?: string;
                      iso8601?: string;
                      jira?: string;
                      [key: string]: unknown;
                  };
                  id?: string;
                  public?: boolean;
                  renderedBody?: { html?: string; [key: string]: unknown };
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >