filter-on-projectname: modified to use project name as filter criteria

This commit is contained in:
miciele Ghiorghis 2013-04-25 13:09:08 +02:00 committed by Oscar Gonzalez Fernandez
parent fb98fa0a4f
commit ee415e2dca

View file

@ -726,8 +726,7 @@ public class CompanyPlanningModel implements ICompanyPlanningModel {
if (predicate != null) { if (predicate != null) {
// If predicate includeChildren then we check if it accepts // If predicate includeChildren then we check if it accepts
// the element // the element
if (predicate.isIncludeChildren() if (!predicate.accepts(associatedTaskElement)) {
&& !predicate.accepts(associatedTaskElement)) {
// If it doesn't accept the element we move on to the // If it doesn't accept the element we move on to the
// next order // next order
continue; continue;
@ -807,6 +806,7 @@ public class CompanyPlanningModel implements ICompanyPlanningModel {
Date startDate = FilterUtils.readProjectsStartDate(); Date startDate = FilterUtils.readProjectsStartDate();
Date endDate = FilterUtils.readProjectsEndDate(); Date endDate = FilterUtils.readProjectsEndDate();
String name = FilterUtils.readProjectsName();
boolean calculateStartDate = (startDate == null); boolean calculateStartDate = (startDate == null);
boolean calculateEndDate = (endDate == null); boolean calculateEndDate = (endDate == null);
@ -842,7 +842,7 @@ public class CompanyPlanningModel implements ICompanyPlanningModel {
filterFinishDate = endDate != null ? LocalDate.fromDateFields(endDate) filterFinishDate = endDate != null ? LocalDate.fromDateFields(endDate)
: null; : null;
return new TaskGroupPredicate(null, startDate, endDate, return new TaskGroupPredicate(null, startDate, endDate,
includeOrderElements); includeOrderElements, name);
} }
private static <T> List<T> notNull(T... values) { private static <T> List<T> notNull(T... values) {