Merge pull request #1319 from KevinVdV/DS-2996-fix-hiearchical-community-retrieval

[DS-2996] Fix retrieval of hierarchical of communities from a collection
This commit is contained in:
Tim Donohue
2016-08-08 12:07:20 -05:00
committed by GitHub
20 changed files with 65 additions and 38 deletions

View File

@@ -241,11 +241,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
List<Community> result = new ArrayList<>();
List<Collection> collections = item.getCollections();
for (Collection collection : collections) {
List<Community> owningCommunities = collection.getCommunities();
for (Community community : owningCommunities) {
result.add(community);
result.addAll(communityService.getAllParents(context, community));
}
result.addAll(communityService.getAllParents(context, collection));
}
return result;