Skip to content

Commit

Permalink
#13231 - Birthdate filter does not hold the selected values
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiuPacurariu committed Jan 15, 2025
1 parent 6886750 commit 4ba3f6d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,14 @@ protected void applyDependenciesOnNewValue(CaseCriteria criteria) {
weekAndDateFilter.getDateToFilter().setValue(criteria.getNewCaseDateTo());
}
}

//Birthdate Filter
HorizontalLayout birthdateFilterForm = (HorizontalLayout) getMoreFiltersContainer().getComponent(BIRTHDATE_RANGE_FILTER);
BirthdateRangeFilterComponent birtdateFilter = (BirthdateRangeFilterComponent) birthdateFilterForm.getComponent(0);
birtdateFilter.getDateFromFilter().setValue(criteria.getBirthdateFrom());
birtdateFilter.getDateToFilter().setValue(criteria.getBirthdateTo());
birtdateFilter.getIncludePartialMatch().setValue(criteria.isIncludePartialMatch());

ComboBox birthDateDD = getField(CaseCriteria.BIRTHDATE_DD);
if (getField(CaseCriteria.BIRTHDATE_YYYY).getValue() != null && getField(CaseCriteria.BIRTHDATE_MM).getValue() != null) {
birthDateDD.addItems(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ protected void applyDependenciesOnNewValue(ContactCriteria newValue) {
weekAndDateFilter.getDateToFilter().setValue(dateTo);
}

//Birthdate Filter
HorizontalLayout birthdateFilterForm = (HorizontalLayout) getMoreFiltersContainer().getComponent(BIRTHDATE_RANGE_FILTER);
BirthdateRangeFilterComponent birtdateFilter = (BirthdateRangeFilterComponent) birthdateFilterForm.getComponent(0);
birtdateFilter.getDateFromFilter().setValue(newValue.getBirthdateFrom());
birtdateFilter.getDateToFilter().setValue(newValue.getBirthdateTo());
birtdateFilter.getIncludePartialMatch().setValue(newValue.isIncludePartialMatch());

if (StringUtils.isBlank(newValue.getEventLike())) {
clearAndDisableFields(ContactCriteria.ONLY_CONTACTS_SHARING_EVENT_WITH_SOURCE_CASE);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,12 @@ protected void applyDependenciesOnNewValue(PersonCriteria criteria) {
birthDateDD.clear();
birthDateDD.setEnabled(false);
}

//Birthdate Filter
HorizontalLayout birthdateFilterForm = (HorizontalLayout) getMoreFiltersContainer().getComponent(BIRTHDATE_RANGE_FILTER);
BirthdateRangeFilterComponent birtdateFilter = (BirthdateRangeFilterComponent) birthdateFilterForm.getComponent(0);
birtdateFilter.getDateFromFilter().setValue(criteria.getBirthdateFrom());
birtdateFilter.getDateToFilter().setValue(criteria.getBirthdateTo());
birtdateFilter.getIncludePartialMatch().setValue(criteria.isIncludePartialMatch());
}
}

0 comments on commit 4ba3f6d

Please sign in to comment.