Bug #1343: Show default filtering dates on company view.

They are calculated by default as the start and end dates of the first and last
open projects, but the user had no feedback on which were those dates.

FEA: ItEr76S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2012-02-02 19:25:13 +01:00
parent 64f5d2665b
commit 3db00dffff

View file

@ -286,7 +286,13 @@ public class CompanyPlanningController implements Composer {
Boolean includeOrderElements = checkIncludeOrderElements.isChecked();
if (listFilters.isEmpty() && startDate == null && finishDate == null) {
return model.getDefaultPredicate(includeOrderElements);
IPredicate predicate = model.getDefaultPredicate(includeOrderElements);
//show filter dates calculated by default on screen
filterStartDate.setValue(model.getFilterStartDate().
toDateMidnight().toDate());
filterFinishDate.setValue(model.getFilterFinishDate().
toDateMidnight().toDate());
return predicate;
}
return new TaskGroupPredicate(listFilters, startDate, finishDate,
includeOrderElements);