jira.js
    Preparing search index...

    Function updateComment

    • Updates a comment.

      This operation can be accessed anonymously.

      Permissions required:

      • Browse projects project permission for the project that the issue containing the comment is in.
      • If issue-level security is configured, issue-level security permission to view the issue.
      • Edit all comments project permission to update any comment or Edit own comments to update comment created by the user.
      • If the comment has visibility restrictions, the user belongs to the group or has the role visibility is restricted to.

      WARNING: Child comments inherit visibility from their parent comment. Attempting to update a child comment's visibility will result in a 400 (Bad Request) error.

      Parameters

      • client: Client
      • parameters: {
            body: {
                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?: | string
                | {
                    content: Record<string, any>[];
                    type: string & {} | "doc";
                    version: number;
                    [key: string]: unknown;
                };
                created?: unknown;
                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?: unknown;
                visibility?: {
                    identifier?: string
                    | null;
                    type?: "role" | "group" | string & {};
                    value?: string;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            expand?: string
            | string[]
            | string & {}
            | (string & {} | "renderedBody")[];
            id: string;
            issueIdOrKey: string;
            notifyUsers?: boolean;
            overrideEditableFlag?: boolean;
        }
        • body: {
              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?: | string
              | {
                  content: Record<string, any>[];
                  type: string & {} | "doc";
                  version: number;
                  [key: string]: unknown;
              };
              created?: unknown;
              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?: unknown;
              visibility?: {
                  identifier?: string
                  | null;
                  type?: "role" | "group" | string & {};
                  value?: string;
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }
          • Optionalauthor?: {
                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;
            }
            • OptionalaccountId?: string

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

            • OptionalaccountType?: string

              The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)

            • Optionalactive?: boolean

              Whether the user is active.

            • 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 settings, this may return an alternative value.

            • OptionalemailAddress?: string

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

            • Optionalself?: string

              The URL of the user.

            • OptionaltimeZone?: string

              The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as null.

          • Optionalbody?:
                | string
                | {
                    content: Record<string, any>[];
                    type: string & {} | "doc";
                    version: number;
                    [key: string]: unknown;
                }

            A document in Atlassian Document Format, or a string of wiki markup — a string is sent to the v2 endpoint that parses it, and the result is read back as a document.

          • Optionalcreated?: unknown

            The date and time at which the comment was created.

          • Optionalid?: string

            The ID of the comment.

          • OptionaljsdAuthorCanSeeRequest?: boolean

            Whether the comment was added from an email sent by a person who is not part of the issue. See Allow external emails to be added as comments on issuesfor information on setting up this feature.

          • OptionaljsdPublic?: boolean

            Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API Create request comment operation.

          • Optionalproperties?: { key?: string; value?: unknown; [key: string]: unknown }[]

            A list of comment properties. Optional on create and update.

          • OptionalrenderedBody?: string

            The rendered version of the comment.

          • Optionalself?: string

            The URL of the comment.

          • OptionalupdateAuthor?: {
                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;
            }
            • OptionalaccountId?: string

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

            • OptionalaccountType?: string

              The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)

            • Optionalactive?: boolean

              Whether the user is active.

            • 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 settings, this may return an alternative value.

            • OptionalemailAddress?: string

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

            • Optionalself?: string

              The URL of the user.

            • OptionaltimeZone?: string

              The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as null.

          • Optionalupdated?: unknown

            The date and time at which the comment was updated last.

          • Optionalvisibility?: {
                identifier?: string | null;
                type?: "role" | "group" | string & {};
                value?: string;
                [key: string]: unknown;
            }
            • Optionalidentifier?: string | null

              The ID of the group or the name of the role that visibility of this item is restricted to.

            • Optionaltype?: "role" | "group" | string & {}

              Whether visibility of this item is restricted to a group or role.

            • Optionalvalue?: string

              The name of the group or role that visibility of this item is restricted to. Please note that the name of a group is mutable, to reliably identify a group use identifier.

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

        • id: string

          The ID of the comment.

        • issueIdOrKey: string

          The ID or key of the issue.

        • OptionalnotifyUsers?: boolean

          Whether users are notified when a comment is updated.

        • OptionaloverrideEditableFlag?: boolean

          Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect app users with the Administer Jira global permission and Forge apps acting on behalf of users with Administer Jira global permission.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              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;
          },
      >