Order datasets on DMP listing (ref #7746)

This commit is contained in:
George Kalampokis 2022-05-11 18:13:35 +03:00
parent 3c3b9ef398
commit 912a3cc095
1 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,6 @@ public class DataManagementPlanManager {
DataTableData<DataManagementPlanListingModel> dataTable = new DataTableData<>();
CompletableFuture itemsFuture;
if (fieldsGroup.equals("listing")) {
if (!dataManagementPlanTableRequest.getCriteria().isOnlyPublic()) {
List<DMP> dmps1 = items.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
@ -249,7 +248,8 @@ public class DataManagementPlanManager {
}
private Set<Dataset> retrieveRelevantDatasets (DatasetCriteria datasetCriteria, UUID principal) {
QueryableList<Dataset> datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getWithCriteria(datasetCriteria);
QueryableList<Dataset> 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<Integer> roles = new ArrayList<>();