jira.js
    Preparing search index...

    Function createCommentWithAttachment

    • This method creates a comment on a customer request using one or more attachment files (uploaded using servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile), with the visibility set by public. See

      Permissions required: Permission to add an attachment.

      Request limitations: Customers can set public visibility only.

      Parameters

      • client: Client
      • parameters: {
            additionalComment?: { body?: string; [key: string]: unknown };
            issueIdOrKey: string;
            public?: boolean;
            temporaryAttachmentIds?: string[];
        }
        • OptionaladditionalComment?: { body?: string; [key: string]: unknown }
          • Optionalbody?: string

            Content of the comment.

        • issueIdOrKey: string

          The ID or key of the customer request to which the attachment will be added.

        • Optionalpublic?: boolean

          Controls whether the comment and its attachments are visible to customers

        • OptionaltemporaryAttachmentIds?: string[]

          List of IDs for the temporary attachments to be added to the customer request.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              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?: {
                          content?: string;
                          jiraRest?: string;
                          self?: string;
                          thumbnail?: string;
                          [key: string]: unknown;
                      };
                      author?: {
                          _links?: {
                              avatarUrls?: ...;
                              jiraRest?: ...;
                              self?: ...;
                              [key: ...]: ...;
                          };
                          accountId?: string;
                          active?: boolean;
                          displayName?: string;
                          emailAddress?: string;
                          key?: string;
                          name?: string;
                          timeZone?: string;
                          [key: string]: unknown;
                      };
                      created?: {
                          epochMillis?: number;
                          friendly?: string;
                          iso8601?: string;
                          jira?: string;
                          [key: string]: unknown;
                      };
                      filename?: string;
                      mimeType?: string;
                      size?: number;
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              };
              comment?: {
                  _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?: {
                              content?: ...;
                              jiraRest?: ...;
                              self?: ...;
                              thumbnail?: ...;
                              [key: ...]: ...;
                          };
                          author?: {
                              _links?: ...;
                              accountId?: ...;
                              active?: ...;
                              displayName?: ...;
                              emailAddress?: ...;
                              key?: ...;
                              name?: ...;
                              timeZone?: ...;
                              [key: ...]: ...;
                          };
                          created?: {
                              epochMillis?: ...;
                              friendly?: ...;
                              iso8601?: ...;
                              jira?: ...;
                              [key: ...]: ...;
                          };
                          filename?: string;
                          mimeType?: string;
                          size?: number;
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  };
                  author?: {
                      _links?: {
                          avatarUrls?: Record<string, any>;
                          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;
          },
      >