getIssueHistory

Description

Retrieve the change history for an issue.

Parameters

Returns

Returns a Promise to the value; you must use await.

Returns an array of zero or more IssueChange objects; each IssueChange object includes an array of zero or more IssueChangeItems.

Note: When an issue is updated from the issue screen (or other Jira screens), it will usually only include a single IssueChangeItem. However, when an issue is updated programmatically, multiple fields or attributes can be updated at once, resulting in several IssueChangeItems included.

interface IssueChange { id: string author: { displayName: string accountId: string accountType: string } created: string items: IssueChangeItem[] } interface IssueChangeItem { field: string fieldId: string fieldtype: 'jira' | 'custom' from: string fromString: string to: string toString: string }

Examples

Return a list of all recent changelog entries.

const changes = await api.issue.getIssueHistory(issue) return changes.map((change)=>change.items.map((item)=>`${item.field} changed from ${item.fromString} to ${item.toString} by ${change.author.displayName}`)).flat()

You are viewing the documentation for Jira Cloud.

Determining custom field IDs