jira.js
    Preparing search index...

    Function editIssue

    • Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not supported and is ignored here. To transition an issue, please use Transition issue.

      The edits to the issue's fields are defined using update and fields. The fields that can be edited are determined using Get edit issue metadata.

      Note: This endpoint doesn't check screen configurations to determine if a field is editable. For more context, see the Deprecation of override screen security announcement.

      The parent field may be set by key or ID. For standard issue types, the parent may be removed by setting update.parent.set.none to true. Note that the description, environment, and any textarea type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (textfield) accept a string and don't handle Atlassian Document Format content.

      Connect apps having an app user with Administer Jira global permission, and Forge apps acting on behalf of users with Administer Jira global permission, can override the screen security configuration using overrideScreenSecurity and overrideEditableFlag.

      This operation can be accessed anonymously.

      Permissions required:

      Parameters

      • client: Client
      • parameters: {
            expand?: string;
            fields?: Record<string, any>;
            historyMetadata?: {
                activityDescription?: string;
                activityDescriptionKey?: string;
                actor?: {
                    avatarUrl?: string;
                    displayName?: string;
                    displayNameKey?: string;
                    id?: string;
                    type?: string;
                    url?: string;
                    [key: string]: unknown;
                };
                cause?: {
                    avatarUrl?: string;
                    displayName?: string;
                    displayNameKey?: string;
                    id?: string;
                    type?: string;
                    url?: string;
                    [key: string]: unknown;
                };
                description?: string;
                descriptionKey?: string;
                emailDescription?: string;
                emailDescriptionKey?: string;
                extraData?: Record<string, any>;
                generator?: {
                    avatarUrl?: string;
                    displayName?: string;
                    displayNameKey?: string;
                    id?: string;
                    type?: string;
                    url?: string;
                    [key: string]: unknown;
                };
                type?: string;
                [key: string]: unknown;
            };
            issueIdOrKey: string;
            notifyUsers?: boolean;
            overrideEditableFlag?: boolean;
            overrideScreenSecurity?: boolean;
            properties?: { key?: string; value?: unknown; [key: string]: unknown }[];
            returnIssue?: boolean;
            transition?: {
                expand?: string;
                fields?: Record<string, any>;
                hasScreen?: boolean;
                id?: string;
                isAvailable?: boolean;
                isConditional?: boolean;
                isGlobal?: boolean;
                isInitial?: boolean;
                looped?: boolean;
                name?: string;
                to?: {
                    description?: string;
                    iconUrl?: string;
                    id?: string;
                    name?: string;
                    scope?: {
                        project?: {
                            avatarUrls?: {
                                "16x16"?: ...;
                                "24x24"?: ...;
                                "32x32"?: ...;
                                "48x48"?: ...;
                                [key: ...]: ...;
                            };
                            id?: string;
                            key?: string;
                            name?: string;
                            projectCategory?: {
                                description?: ...;
                                id?: ...;
                                name?: ...;
                                self?: ...;
                                [key: ...]: ...;
                            };
                            projectTypeKey?: | (...) & (...)
                            | "software"
                            | "service_desk"
                            | "business"
                            | "product_discovery"
                            | "customer_service";
                            self?: string;
                            simplified?: boolean;
                            [key: string]: unknown;
                        };
                        type?: string & {}
                        | "PROJECT"
                        | "TEMPLATE";
                        [key: string]: unknown;
                    };
                    self?: string;
                    statusCategory?: {
                        colorName?: string;
                        id?: number;
                        key?: string;
                        name?: string;
                        self?: string;
                        [key: string]: unknown;
                    };
                    untranslatedName?: string;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            update?: Record<string, any>;
        }
        • Optionalexpand?: string

          The Get issue API expand parameter to use in the response if the returnIssue parameter is true.

        • Optionalfields?: Record<string, any>

          List of issue screen fields to update, specifying the sub-field to update and its value for each field. This field provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are required, use update. Fields included in here cannot be included in update.

        • OptionalhistoryMetadata?: {
              activityDescription?: string;
              activityDescriptionKey?: string;
              actor?: {
                  avatarUrl?: string;
                  displayName?: string;
                  displayNameKey?: string;
                  id?: string;
                  type?: string;
                  url?: string;
                  [key: string]: unknown;
              };
              cause?: {
                  avatarUrl?: string;
                  displayName?: string;
                  displayNameKey?: string;
                  id?: string;
                  type?: string;
                  url?: string;
                  [key: string]: unknown;
              };
              description?: string;
              descriptionKey?: string;
              emailDescription?: string;
              emailDescriptionKey?: string;
              extraData?: Record<string, any>;
              generator?: {
                  avatarUrl?: string;
                  displayName?: string;
                  displayNameKey?: string;
                  id?: string;
                  type?: string;
                  url?: string;
                  [key: string]: unknown;
              };
              type?: string;
              [key: string]: unknown;
          }
          • OptionalactivityDescription?: string

            The activity described in the history record.

          • OptionalactivityDescriptionKey?: string

            The key of the activity described in the history record.

          • Optionalactor?: {
                avatarUrl?: string;
                displayName?: string;
                displayNameKey?: string;
                id?: string;
                type?: string;
                url?: string;
                [key: string]: unknown;
            }
            • OptionalavatarUrl?: string

              The URL to an avatar for the user or system associated with a history record.

            • OptionaldisplayName?: string

              The display name of the user or system associated with a history record.

            • OptionaldisplayNameKey?: string

              The key of the display name of the user or system associated with a history record.

            • Optionalid?: string

              The ID of the user or system associated with a history record.

            • Optionaltype?: string

              The type of the user or system associated with a history record.

            • Optionalurl?: string

              The URL of the user or system associated with a history record.

          • Optionalcause?: {
                avatarUrl?: string;
                displayName?: string;
                displayNameKey?: string;
                id?: string;
                type?: string;
                url?: string;
                [key: string]: unknown;
            }
            • OptionalavatarUrl?: string

              The URL to an avatar for the user or system associated with a history record.

            • OptionaldisplayName?: string

              The display name of the user or system associated with a history record.

            • OptionaldisplayNameKey?: string

              The key of the display name of the user or system associated with a history record.

            • Optionalid?: string

              The ID of the user or system associated with a history record.

            • Optionaltype?: string

              The type of the user or system associated with a history record.

            • Optionalurl?: string

              The URL of the user or system associated with a history record.

          • Optionaldescription?: string

            The description of the history record.

          • OptionaldescriptionKey?: string

            The description key of the history record.

          • OptionalemailDescription?: string

            The description of the email address associated the history record.

          • OptionalemailDescriptionKey?: string

            The description key of the email address associated the history record.

          • OptionalextraData?: Record<string, any>

            Additional arbitrary information about the history record.

          • Optionalgenerator?: {
                avatarUrl?: string;
                displayName?: string;
                displayNameKey?: string;
                id?: string;
                type?: string;
                url?: string;
                [key: string]: unknown;
            }
            • OptionalavatarUrl?: string

              The URL to an avatar for the user or system associated with a history record.

            • OptionaldisplayName?: string

              The display name of the user or system associated with a history record.

            • OptionaldisplayNameKey?: string

              The key of the display name of the user or system associated with a history record.

            • Optionalid?: string

              The ID of the user or system associated with a history record.

            • Optionaltype?: string

              The type of the user or system associated with a history record.

            • Optionalurl?: string

              The URL of the user or system associated with a history record.

          • Optionaltype?: string

            The type of the history record.

        • issueIdOrKey: string

          The ID or key of the issue.

        • OptionalnotifyUsers?: boolean

          Whether a notification email about the issue update is sent to all watchers. To disable the notification, administer Jira or administer project permissions are required. If the user doesn't have the necessary permission the request is ignored.

        • OptionaloverrideEditableFlag?: boolean

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

        • OptionaloverrideScreenSecurity?: boolean

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

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

          Details of issue properties to be add or update.

        • OptionalreturnIssue?: boolean

          Whether the response should contain the issue with fields edited in this request. The returned issue will have the same format as in the Get issue API.

        • Optionaltransition?: {
              expand?: string;
              fields?: Record<string, any>;
              hasScreen?: boolean;
              id?: string;
              isAvailable?: boolean;
              isConditional?: boolean;
              isGlobal?: boolean;
              isInitial?: boolean;
              looped?: boolean;
              name?: string;
              to?: {
                  description?: string;
                  iconUrl?: string;
                  id?: string;
                  name?: string;
                  scope?: {
                      project?: {
                          avatarUrls?: {
                              "16x16"?: ...;
                              "24x24"?: ...;
                              "32x32"?: ...;
                              "48x48"?: ...;
                              [key: ...]: ...;
                          };
                          id?: string;
                          key?: string;
                          name?: string;
                          projectCategory?: {
                              description?: ...;
                              id?: ...;
                              name?: ...;
                              self?: ...;
                              [key: ...]: ...;
                          };
                          projectTypeKey?: | (...) & (...)
                          | "software"
                          | "service_desk"
                          | "business"
                          | "product_discovery"
                          | "customer_service";
                          self?: string;
                          simplified?: boolean;
                          [key: string]: unknown;
                      };
                      type?: string & {}
                      | "PROJECT"
                      | "TEMPLATE";
                      [key: string]: unknown;
                  };
                  self?: string;
                  statusCategory?: {
                      colorName?: string;
                      id?: number;
                      key?: string;
                      name?: string;
                      self?: string;
                      [key: string]: unknown;
                  };
                  untranslatedName?: string;
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }
          • Optionalexpand?: string

            Expand options that include additional transition details in the response.

          • Optionalfields?: Record<string, any>

            Details of the fields associated with the issue transition screen. Use this information to populate fields and update in a transition request.

          • OptionalhasScreen?: boolean

            Whether there is a screen associated with the issue transition.

          • Optionalid?: string

            The ID of the issue transition. Required when specifying a transition to undertake.

          • OptionalisAvailable?: boolean

            Whether the transition is available to be performed.

          • OptionalisConditional?: boolean

            Whether the issue has to meet criteria before the issue transition is applied.

          • OptionalisGlobal?: boolean

            Whether the issue transition is global, that is, the transition is applied to issues regardless of their status.

          • OptionalisInitial?: boolean

            Whether this is the initial issue transition for the workflow.

          • Optionallooped?: boolean
          • Optionalname?: string

            The name of the issue transition.

          • Optionalto?: {
                description?: string;
                iconUrl?: string;
                id?: string;
                name?: string;
                scope?: {
                    project?: {
                        avatarUrls?: {
                            "16x16"?: ...;
                            "24x24"?: ...;
                            "32x32"?: ...;
                            "48x48"?: ...;
                            [key: ...]: ...;
                        };
                        id?: string;
                        key?: string;
                        name?: string;
                        projectCategory?: {
                            description?: ...;
                            id?: ...;
                            name?: ...;
                            self?: ...;
                            [key: ...]: ...;
                        };
                        projectTypeKey?: | (...) & (...)
                        | "software"
                        | "service_desk"
                        | "business"
                        | "product_discovery"
                        | "customer_service";
                        self?: string;
                        simplified?: boolean;
                        [key: string]: unknown;
                    };
                    type?: string & {}
                    | "PROJECT"
                    | "TEMPLATE";
                    [key: string]: unknown;
                };
                self?: string;
                statusCategory?: {
                    colorName?: string;
                    id?: number;
                    key?: string;
                    name?: string;
                    self?: string;
                    [key: string]: unknown;
                };
                untranslatedName?: string;
                [key: string]: unknown;
            }
            • Optionaldescription?: string

              The description of the status.

            • OptionaliconUrl?: string

              The URL of the icon used to represent the status.

            • Optionalid?: string

              The ID of the status.

            • Optionalname?: string

              The name of the status.

            • Optionalscope?: {
                  project?: {
                      avatarUrls?: {
                          "16x16"?: ...;
                          "24x24"?: ...;
                          "32x32"?: ...;
                          "48x48"?: ...;
                          [key: ...]: ...;
                      };
                      id?: string;
                      key?: string;
                      name?: string;
                      projectCategory?: {
                          description?: ...;
                          id?: ...;
                          name?: ...;
                          self?: ...;
                          [key: ...]: ...;
                      };
                      projectTypeKey?: | (...) & (...)
                      | "software"
                      | "service_desk"
                      | "business"
                      | "product_discovery"
                      | "customer_service";
                      self?: string;
                      simplified?: boolean;
                      [key: string]: unknown;
                  };
                  type?: string & {}
                  | "PROJECT"
                  | "TEMPLATE";
                  [key: string]: unknown;
              }
              • Optionalproject?: {
                    avatarUrls?: {
                        "16x16"?: ...;
                        "24x24"?: ...;
                        "32x32"?: ...;
                        "48x48"?: ...;
                        [key: ...]: ...;
                    };
                    id?: string;
                    key?: string;
                    name?: string;
                    projectCategory?: {
                        description?: ...;
                        id?: ...;
                        name?: ...;
                        self?: ...;
                        [key: ...]: ...;
                    };
                    projectTypeKey?: | (...) & (...)
                    | "software"
                    | "service_desk"
                    | "business"
                    | "product_discovery"
                    | "customer_service";
                    self?: string;
                    simplified?: boolean;
                    [key: string]: unknown;
                }
                • OptionalavatarUrls?: { "16x16"?: ...; "24x24"?: ...; "32x32"?: ...; "48x48"?: ...; [key: ...]: ... }
                  • Optional16x16?: ...

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

                  • Optional24x24?: ...

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

                  • Optional32x32?: ...

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

                  • Optional48x48?: ...

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

                • Optionalid?: string

                  The ID of the project.

                • Optionalkey?: string

                  The key of the project.

                • Optionalname?: string

                  The name of the project.

                • OptionalprojectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; [key: ...]: ... }
                  • Optionaldescription?: ...

                    The name of the project category.

                  • Optionalid?: ...

                    The ID of the project category.

                  • Optionalname?: ...

                    The description of the project category.

                  • Optionalself?: ...

                    The URL of the project category.

                • OptionalprojectTypeKey?:
                      | (...) & (...)
                      | "software"
                      | "service_desk"
                      | "business"
                      | "product_discovery"
                      | "customer_service"

                  The project type of the project.

                • Optionalself?: string

                  The URL of the project details.

                • Optionalsimplified?: boolean

                  Whether or not the project is simplified.

              • Optionaltype?: string & {} | "PROJECT" | "TEMPLATE"

                The type of scope.

            • Optionalself?: string

              The URL of the status.

            • OptionalstatusCategory?: {
                  colorName?: string;
                  id?: number;
                  key?: string;
                  name?: string;
                  self?: string;
                  [key: string]: unknown;
              }
              • OptionalcolorName?: string

                The name of the color used to represent the status category.

              • Optionalid?: number

                The ID of the status category.

              • Optionalkey?: string

                The key of the status category.

              • Optionalname?: string

                The name of the status category.

              • Optionalself?: string

                The URL of the status category.

            • OptionaluntranslatedName?: string
        • Optionalupdate?: Record<string, any>

          A Map containing the field field name and a list of operations to perform on the issue screen field. Note that fields included in here cannot be included in fields.

      • Optionaloptions: RequestOptions

      Returns Promise<void>