my Jira plugin contains a web panel that displays the last changes made in an issue + some additional information. For this I get all the ChangeHistoryItems from the ChangeHistoryManager for the current issue. This works fine for native Jira fields but the from and to values of custom fields are null. As I understand it, getFrom() can only be null if the field had no value before.
List changedItems = SolManListener.changeHistoryManager.getAllChangeItems(issue);
ChangeHistoryItem changeHistoryItem = changedItems.get(changedItems.size() - 1);
changeHistoryItem.getFrom(); // this is null
changeHistoryItem.getTo(); // this is null
Does anyone know why this doesn’t work for custom fields? Is there another way to get the changed values?