From 217fa6a4a5dbed04420e898700c7d383f9cd9913 Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Thu, 6 Jul 2023 11:11:00 +0500 Subject: [PATCH 1/2] Fix advanced search for non-active children --- src/main/java/org/opensrp/web/utils/SearchHelper.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/opensrp/web/utils/SearchHelper.java b/src/main/java/org/opensrp/web/utils/SearchHelper.java index bf111db4f..a15eeb9f2 100644 --- a/src/main/java/org/opensrp/web/utils/SearchHelper.java +++ b/src/main/java/org/opensrp/web/utils/SearchHelper.java @@ -33,6 +33,7 @@ public static SearchEntityWrapper childSearchParamProcessor(HttpServletRequest r String BIRTH_DATE = "birth_date"; //Attributes + String ACTIVE = "active"; String INACTIVE = "inactive"; String LOST_TO_FOLLOW_UP = "lost_to_follow_up"; String NFC_CARD_IDENTIFIER = "nfc_card_identifier"; @@ -57,6 +58,7 @@ public static SearchEntityWrapper childSearchParamProcessor(HttpServletRequest r searchBean.setLastName(RestUtils.getStringFilter(LAST_NAME, request)); searchBean.setGender(RestUtils.getStringFilter(GENDER, request)); + String active = RestUtils.getStringFilter(ACTIVE, request); String inActive = RestUtils.getStringFilter(INACTIVE, request); String lostToFollowUp = RestUtils.getStringFilter(LOST_TO_FOLLOW_UP, request); String nfcCardIdentifier = RestUtils.getStringFilter(NFC_CARD_IDENTIFIER, request); @@ -85,8 +87,12 @@ public static SearchEntityWrapper childSearchParamProcessor(HttpServletRequest r } Map attributes = new HashMap(); - if (!StringUtils.isBlank(inActive) || !StringUtils.isBlank(lostToFollowUp) - || !StringUtils.isBlank(nfcCardIdentifier)) { + if (!StringUtils.isBlank(active) || !StringUtils.isBlank(inActive) + || !StringUtils.isBlank(lostToFollowUp) || !StringUtils.isBlank(nfcCardIdentifier)) { + + if (!StringUtils.isBlank(active)) { + attributes.put(ACTIVE, active); + } if (!StringUtils.isBlank(inActive)) { attributes.put(INACTIVE, inActive); @@ -101,6 +107,7 @@ public static SearchEntityWrapper childSearchParamProcessor(HttpServletRequest r } } + searchBean.setIdentifiers(identifiers); searchBean.setAttributes(attributes); From 08c9546a512565c96d15c8c7c91002750bcc1bce Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Thu, 6 Jul 2023 11:12:01 +0500 Subject: [PATCH 2/2] Bump up core and web version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bced9f9c1..7d7c8335e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ opensrp-server-web war - 3.2.11-SNAPSHOT + 3.2.12-SNAPSHOT opensrp-server-web OpenSRP Server Web Application https://github.com/OpenSRP/opensrp-server-web @@ -25,7 +25,7 @@ 6.1.6.RELEASE always 1.5.1 - 3.2.8-SNAPSHOT + 3.2.10-SNAPSHOT 2.4.1-SNAPSHOT 2.0.1-SNAPSHOT 2.0.5