Function: editIssue()
function editIssue(
client,
parameters,
options?
): Promise<void>;Defined in: src/cloud/api/issues.ts:389
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:
- Browse projects and Edit issues project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { expand?: string; fields?: IssueFieldsInput; historyMetadata?: { activityDescription?: string; activityDescriptionKey?: string; actor?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; cause?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; description?: string; descriptionKey?: string; emailDescription?: string; emailDescriptionKey?: string; extraData?: Record<string, string>; generator?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; type?: string; }; issueIdOrKey: string; notifyUsers?: boolean; overrideEditableFlag?: boolean; overrideScreenSecurity?: boolean; properties?: object[]; returnIssue?: boolean; transition?: { expand?: string; fields?: Record<string, { allowedValues?: unknown[]; autoCompleteUrl?: string; configuration?: Record<string, any>; defaultValue?: unknown; hasDefaultValue?: boolean; key: string; name: string; operations: string[]; required: boolean; schema?: { configuration?: Record<string, any>; custom?: string; customId?: number; items?: string; system?: string; type: string; }; }>; 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?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; statusCategory?: { colorName?: string; id?: number; key?: string; name?: string; self?: string; }; untranslatedName?: string; }; }; update?: Record<string, object[]>; } | - |
parameters.expand? | string | The Get issue API expand parameter to use in the response if the returnIssue parameter is true. |
parameters.fields? | IssueFieldsInput | 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. |
parameters.historyMetadata? | { activityDescription?: string; activityDescriptionKey?: string; actor?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; cause?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; description?: string; descriptionKey?: string; emailDescription?: string; emailDescriptionKey?: string; extraData?: Record<string, string>; generator?: { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; }; type?: string; } | - |
parameters.historyMetadata.activityDescription? | string | The activity described in the history record. |
parameters.historyMetadata.activityDescriptionKey? | string | The key of the activity described in the history record. |
parameters.historyMetadata.actor? | { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; } | - |
parameters.historyMetadata.actor.avatarUrl? | string | The URL to an avatar for the user or system associated with a history record. |
parameters.historyMetadata.actor.displayName? | string | The display name of the user or system associated with a history record. |
parameters.historyMetadata.actor.displayNameKey? | string | The key of the display name of the user or system associated with a history record. |
parameters.historyMetadata.actor.id? | string | The ID of the user or system associated with a history record. |
parameters.historyMetadata.actor.type? | string | The type of the user or system associated with a history record. |
parameters.historyMetadata.actor.url? | string | The URL of the user or system associated with a history record. |
parameters.historyMetadata.cause? | { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; } | - |
parameters.historyMetadata.cause.avatarUrl? | string | The URL to an avatar for the user or system associated with a history record. |
parameters.historyMetadata.cause.displayName? | string | The display name of the user or system associated with a history record. |
parameters.historyMetadata.cause.displayNameKey? | string | The key of the display name of the user or system associated with a history record. |
parameters.historyMetadata.cause.id? | string | The ID of the user or system associated with a history record. |
parameters.historyMetadata.cause.type? | string | The type of the user or system associated with a history record. |
parameters.historyMetadata.cause.url? | string | The URL of the user or system associated with a history record. |
parameters.historyMetadata.description? | string | The description of the history record. |
parameters.historyMetadata.descriptionKey? | string | The description key of the history record. |
parameters.historyMetadata.emailDescription? | string | The description of the email address associated the history record. |
parameters.historyMetadata.emailDescriptionKey? | string | The description key of the email address associated the history record. |
parameters.historyMetadata.extraData? | Record<string, string> | Additional arbitrary information about the history record. |
parameters.historyMetadata.generator? | { avatarUrl?: string; displayName?: string; displayNameKey?: string; id?: string; type?: string; url?: string; } | - |
parameters.historyMetadata.generator.avatarUrl? | string | The URL to an avatar for the user or system associated with a history record. |
parameters.historyMetadata.generator.displayName? | string | The display name of the user or system associated with a history record. |
parameters.historyMetadata.generator.displayNameKey? | string | The key of the display name of the user or system associated with a history record. |
parameters.historyMetadata.generator.id? | string | The ID of the user or system associated with a history record. |
parameters.historyMetadata.generator.type? | string | The type of the user or system associated with a history record. |
parameters.historyMetadata.generator.url? | string | The URL of the user or system associated with a history record. |
parameters.historyMetadata.type? | string | The type of the history record. |
parameters.issueIdOrKey? | string | The ID or key of the issue. |
parameters.notifyUsers? | 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. |
parameters.overrideEditableFlag? | 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. |
parameters.overrideScreenSecurity? | 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. |
parameters.properties? | object[] | Details of issue properties to be add or update. |
parameters.returnIssue? | 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. |
parameters.transition? | { expand?: string; fields?: Record<string, { allowedValues?: unknown[]; autoCompleteUrl?: string; configuration?: Record<string, any>; defaultValue?: unknown; hasDefaultValue?: boolean; key: string; name: string; operations: string[]; required: boolean; schema?: { configuration?: Record<string, any>; custom?: string; customId?: number; items?: string; system?: string; type: string; }; }>; 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?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; statusCategory?: { colorName?: string; id?: number; key?: string; name?: string; self?: string; }; untranslatedName?: string; }; } | - |
parameters.transition.expand? | string | Expand options that include additional transition details in the response. |
parameters.transition.fields? | Record<string, { allowedValues?: unknown[]; autoCompleteUrl?: string; configuration?: Record<string, any>; defaultValue?: unknown; hasDefaultValue?: boolean; key: string; name: string; operations: string[]; required: boolean; schema?: { configuration?: Record<string, any>; custom?: string; customId?: number; items?: string; system?: string; type: string; }; }> | Details of the fields associated with the issue transition screen. Use this information to populate fields and update in a transition request. |
parameters.transition.hasScreen? | boolean | Whether there is a screen associated with the issue transition. |
parameters.transition.id? | string | The ID of the issue transition. Required when specifying a transition to undertake. |
parameters.transition.isAvailable? | boolean | Whether the transition is available to be performed. |
parameters.transition.isConditional? | boolean | Whether the issue has to meet criteria before the issue transition is applied. |
parameters.transition.isGlobal? | boolean | Whether the issue transition is global, that is, the transition is applied to issues regardless of their status. |
parameters.transition.isInitial? | boolean | Whether this is the initial issue transition for the workflow. |
parameters.transition.looped? | boolean | - |
parameters.transition.name? | string | The name of the issue transition. |
parameters.transition.to? | { description?: string; iconUrl?: string; id?: string; name?: string; scope?: { project?: { avatarUrls?: { 16x16?: ...; 24x24?: ...; 32x32?: ...; 48x48?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; statusCategory?: { colorName?: string; id?: number; key?: string; name?: string; self?: string; }; untranslatedName?: string; } | - |
parameters.transition.to.description? | string | The description of the status. |
parameters.transition.to.iconUrl? | string | The URL of the icon used to represent the status. |
parameters.transition.to.id? | string | The ID of the status. |
parameters.transition.to.name? | string | The name of the status. |
parameters.transition.to.scope? | { project?: { avatarUrls?: { 16x16?: ...; 24x24?: ...; 32x32?: ...; 48x48?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; } | - |
parameters.transition.to.scope.project? | { avatarUrls?: { 16x16?: ...; 24x24?: ...; 32x32?: ...; 48x48?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; } | - |
parameters.transition.to.scope.project.avatarUrls? | { 16x16?: ...; 24x24?: ...; 32x32?: ...; 48x48?: ...; } | - |
parameters.transition.to.scope.project.avatarUrls.16x16? | ... | The URL of the item's 16x16 pixel avatar. |
parameters.transition.to.scope.project.avatarUrls.24x24? | ... | The URL of the item's 24x24 pixel avatar. |
parameters.transition.to.scope.project.avatarUrls.32x32? | ... | The URL of the item's 32x32 pixel avatar. |
parameters.transition.to.scope.project.avatarUrls.48x48? | ... | The URL of the item's 48x48 pixel avatar. |
parameters.transition.to.scope.project.id? | string | The ID of the project. |
parameters.transition.to.scope.project.key? | string | The key of the project. |
parameters.transition.to.scope.project.name? | string | The name of the project. |
parameters.transition.to.scope.project.projectCategory? | { description?: ...; id?: ...; name?: ...; self?: ...; } | - |
parameters.transition.to.scope.project.projectCategory.description? | ... | The name of the project category. |
parameters.transition.to.scope.project.projectCategory.id? | ... | The ID of the project category. |
parameters.transition.to.scope.project.projectCategory.name? | ... | The description of the project category. |
parameters.transition.to.scope.project.projectCategory.self? | ... | The URL of the project category. |
parameters.transition.to.scope.project.projectTypeKey? | | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service" | The project type of the project. |
parameters.transition.to.scope.project.self? | string | The URL of the project details. |
parameters.transition.to.scope.project.simplified? | boolean | Whether or not the project is simplified. |
parameters.transition.to.scope.type? | string & object | "PROJECT" | "TEMPLATE" | The type of scope. |
parameters.transition.to.self? | string | The URL of the status. |
parameters.transition.to.statusCategory? | { colorName?: string; id?: number; key?: string; name?: string; self?: string; } | - |
parameters.transition.to.statusCategory.colorName? | string | The name of the color used to represent the status category. |
parameters.transition.to.statusCategory.id? | number | The ID of the status category. |
parameters.transition.to.statusCategory.key? | string | The key of the status category. |
parameters.transition.to.statusCategory.name? | string | The name of the status category. |
parameters.transition.to.statusCategory.self? | string | The URL of the status category. |
parameters.transition.to.untranslatedName? | string | - |
parameters.update? | Record<string, object[]> | 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. |
options? | RequestOptions | - |
Returns
Promise<void>