/** * Fetches all change history items for this batch's issue. * * @return a list of ChangeHistory */ private ImmutableList<ChangeHistory> fetchAllChangeGroups() { if (issues.isEmpty()) { return ImmutableList.of(); } log.debug("About to fetch change groups for issues: {}", issues.keySet()); OfBizListIterator changeGroups = ofBizDelegator.findListIteratorByCondition("ChangeGroup", new EntityExpr("issue", IN, issues.keySet()), null, null, ImmutableList.of("created ASC", "id ASC"), null); try { log.debug("Fetched {} change groups"); return wrapChangeHistories(changeGroups); } finally { changeGroups.close(); } }