From cd17d48d28afbd5c56f25dada5b5cbe612f73295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenzo=20Tilve=20=C3=81lvaro?= Date: Mon, 11 Mar 2013 19:31:15 +0100 Subject: [PATCH] Fix wrong behaviour of projects list filtering The component that shows the filtering results is adding the unscheduled projects when they are not excluded by the dates range, but they were appearing also when they were not matching the combobox conditions. FEA: ItEr77S15FilteringEnhancements --- .../libreplan/business/orders/daos/OrderDAO.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/daos/OrderDAO.java b/libreplan-business/src/main/java/org/libreplan/business/orders/daos/OrderDAO.java index 26f602680..9de3542a0 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/daos/OrderDAO.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/daos/OrderDAO.java @@ -240,21 +240,10 @@ public class OrderDAO extends IntegrationEntityDAO implements org.hibernate.criterion.Criterion and = Restrictions.and( Restrictions.in("id", ordersIdsFiltered), Restrictions.in("id", ordersIdsByDates)); - if (ordersIdsUnscheduled.isEmpty()) { - c.add(and); - } else { - c.add(Restrictions.or(and, - Restrictions.in("id", ordersIdsUnscheduled))); - } + c.add(and); } else { if (ordersIdsFiltered != null) { - if (ordersIdsUnscheduled.isEmpty()) { - c.add(Restrictions.in("id", ordersIdsFiltered)); - } else { - c.add(Restrictions.or( - Restrictions.in("id", ordersIdsFiltered), - Restrictions.in("id", ordersIdsUnscheduled))); - } + c.add(Restrictions.in("id", ordersIdsFiltered)); } if (ordersIdsByDates != null) { if (ordersIdsUnscheduled.isEmpty()) {