I am working on a plugin and trying to get a list of transitions for an issue.
I was thinking to look through the change history for changes to status using the title method in code below
List<Issue> issues = new ArrayList();
issues.add(currentIssue);
List<String> fields = new ArrayList();
fields.add("status");
List<ChangeHistory> transHist = chgManager.getChangeItemsWithFieldsForIssues(issues, fields);
for (ChangeHistory change : transHist) {
UserHistoryEvent event = new UserHistoryEvent(change.getAuthorDisplayName(), change.getTimePerformed(),
"Transition", change.getId());
List<ChangeItemBean> cha = change.getChangeItemBeans();
events.add(event);
}
I am getting all change histories returned (3 in test) although only one amends status.
When I look for change items in debug the ChangeItemBean list is empty.
Am I missing a trick? Is there an easier method to get a list of issue transitions?
Tom