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
This commit is contained in:
parent
cabf12ad8f
commit
cd17d48d28
1 changed files with 2 additions and 13 deletions
|
|
@ -240,21 +240,10 @@ public class OrderDAO extends IntegrationEntityDAO<Order> 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()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue