From 38c74ce733c4ea3a9009ee80b94bd54587fee59d Mon Sep 17 00:00:00 2001 From: Gunter Zeilinger Date: Wed, 18 Oct 2023 15:52:47 +0200 Subject: [PATCH] UI: Monitoring / Storage Commitments: sort list by descending Updated time (stgcmt_result.updated_time) fix #4262 --- .../src/main/java/org/dcm4chee/arc/stgcmt/impl/StgCmtEJB.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dcm4chee-arc-stgcmt/src/main/java/org/dcm4chee/arc/stgcmt/impl/StgCmtEJB.java b/dcm4chee-arc-stgcmt/src/main/java/org/dcm4chee/arc/stgcmt/impl/StgCmtEJB.java index 071fdd99fe..564a853452 100644 --- a/dcm4chee-arc-stgcmt/src/main/java/org/dcm4chee/arc/stgcmt/impl/StgCmtEJB.java +++ b/dcm4chee-arc-stgcmt/src/main/java/org/dcm4chee/arc/stgcmt/impl/StgCmtEJB.java @@ -187,6 +187,7 @@ public List listStgCmts(StgCmtResultQueryParam queryParam, int off List predicates = queryBuilder.stgCmtResultPredicates(stgCmtResult, queryParam); if (!predicates.isEmpty()) q.where(predicates.toArray(new Predicate[0])); + q.orderBy(cb.desc(stgCmtResult.get(StgCmtResult_.updatedTime))); TypedQuery query = em.createQuery(q); if (offset > 0) query.setFirstResult(offset);