Previous assignee

I want to make some operations in java, when assignee of a task is changed.
I can get an assignee from issue like:

@EventListener
public void onIssueEvent(IssueEvent issueEvent) {
    Long eventTypeId = issueEvent.getEventTypeId();
    Long issue = issueEvent.getIssue().getAssigneeId();
}

but it return only the current one. Is there any way to get the previous one?

You want https://docs.atlassian.com/jira/7.1.7/com/atlassian/jira/issue/changehistory/ChangeHistoryManager.html . Basically once you know the issue - you can look up the history of a specific field.

2 Likes