diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java index 34cfadcd2..d0d051375 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java @@ -179,7 +179,6 @@ public class DataManagementPlanManager { DataTableData dataTable = new DataTableData<>(); - CompletableFuture itemsFuture; if (fieldsGroup.equals("listing")) { if (!dataManagementPlanTableRequest.getCriteria().isOnlyPublic()) { List dmps1 = items.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class)) @@ -249,7 +248,8 @@ public class DataManagementPlanManager { } private Set retrieveRelevantDatasets (DatasetCriteria datasetCriteria, UUID principal) { - QueryableList datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getWithCriteria(datasetCriteria); + QueryableList datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getWithCriteria(datasetCriteria) + .orderBy((builder, root) -> builder.desc(root.get("modified"))); if (principal != null) { UserInfo userInfo = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal); List roles = new ArrayList<>();