Skip to content

Commit

Permalink
Merge pull request #3420 from akvo/issue/3408-only-one-since-in-search
Browse files Browse the repository at this point in the history
[#3408]Use surveyGroupId when searching.
  • Loading branch information
iperdomo authored Feb 17, 2020
2 parents 60d5c01 + 1947d65 commit 11c7627
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Map<String, Object> listDataPoints(
boolean searchIdentifiers = false;

if (search != null && !"".equals(search) && surveyGroupId != null) {
sls = surveyedLocaleDao.listSurveyedLocales(since, null, null, null, search);
sls = surveyedLocaleDao.listSurveyedLocales(since, surveyGroupId, null, null, search);
searchIdentifiers = search.matches(SurveyedLocale.IDENTIFIER_PATTERN); //could consider a2a2-a2a2-a2a too
} else if (identifier != null && !"".equals(identifier)) {
sls = surveyedLocaleDao.listSurveyedLocales(since, null, identifier, null, null);
Expand All @@ -82,7 +82,7 @@ public Map<String, Object> listDataPoints(
if (searchIdentifiers) {
//JDO implementation cannot handle both OR and a prefix in a filter expression,
//so we have to search again and concatenate
List<SurveyedLocale> sls2 = surveyedLocaleDao.listSurveyedLocales(null, null, search, null, null);
List<SurveyedLocale> sls2 = surveyedLocaleDao.listSurveyedLocales(null, surveyGroupId, search, null, null);
copyToDtoList(sls2, locales);
}

Expand Down

0 comments on commit 11c7627

Please sign in to comment.