Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow search via post #1176

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
10e25c3
allow search via post
hilpitome Nov 16, 2022
9cc4010
rename test methods
hilpitome Nov 16, 2022
93abcba
apply formating
hilpitome Nov 17, 2022
db87055
rename searchByPath methods
hilpitome Nov 23, 2022
87c1806
fix codacy issues
hilpitome Nov 23, 2022
6e72c94
revert deleted exportEventDataMapper
hilpitome Nov 23, 2022
c98a3d1
use SearchService#searchGlobalClient instead of searchClient method
hilpitome Dec 22, 2022
0327bc4
get json string values as null instead of empty string
hilpitome Dec 22, 2022
5739e75
extract out duplicates in old search method
hilpitome Dec 23, 2022
7b80ee6
Trigger checks
hilpitome Dec 23, 2022
11d8a05
update codacy suggestions
hilpitome Jan 9, 2023
92098c9
reduce NPath complexity
hilpitome Jan 9, 2023
451dad7
deduplicate setCoreFilters
hilpitome Jan 9, 2023
b7e27a0
deduplicate setcorefilters
hilpitome Jan 12, 2023
69de169
Trigger checks
hilpitome Jan 13, 2023
042c9a1
fix nullpointerexception from Utils class
hilpitome Jan 13, 2023
4df76a4
use valid opensrp-server-core version
hilpitome Jan 13, 2023
a5b90a5
codacy fixe
hilpitome Jan 16, 2023
a7638bb
apply openmrs formatter
hilpitome Jan 17, 2023
ae921d4
initialize variable
hilpitome Jan 17, 2023
e2004db
fix codacy issue
hilpitome Jan 20, 2023
1fdcb9f
revert to clientService methods without acl
hilpitome Jan 20, 2023
19aaee8
create alpha snapshot for testing
hilpitome Jan 23, 2023
8d879be
version as alpha
hilpitome Jan 23, 2023
d7c6e72
bump up version
hilpitome Mar 7, 2023
17942f6
add logging
hilpitome Mar 8, 2023
4bdc8d8
Merge branch '1172-master-allow-search-via-post' of github.com:opensr…
hilpitome Mar 8, 2023
b229f88
refactor getStringFilter mthd
hilpitome Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/opensrp/web/rest/ClientResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public ResponseEntity<Identifier> findIds(
@RequestParam(value = "fromDate", required = false) String fromDate,
@RequestParam(value = "toDate", required = false) String toDate) {
Pair<List<String>, Long> taskIdsPair = clientService.findAllIds(serverVersion, DEFAULT_GET_ALL_IDS_LIMIT, isArchived,
Utils.getDateTimeFromString(fromDate), Utils.getDateTimeFromString(toDate));
Utils.getDateFromString(fromDate), Utils.getDateFromString(toDate));
Identifier identifiers = new Identifier();
identifiers.setIdentifiers(taskIdsPair.getLeft());
identifiers.setLastServerVersion(taskIdsPair.getRight());
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/opensrp/web/rest/EventResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@ protected ResponseEntity<Identifier> getAllIdsByEventType(
try {

Pair<List<String>, Long> eventIdsPair = eventService.findAllIdsByEventType(eventType, isDeleted, serverVersion,
Constants.DEFAULT_GET_ALL_IDS_LIMIT, Utils.getDateTimeFromString(fromDate),
Utils.getDateTimeFromString(toDate));
Constants.DEFAULT_GET_ALL_IDS_LIMIT, Utils.getDateFromString(fromDate),
Utils.getDateFromString(toDate));
Identifier identifiers = new Identifier();
identifiers.setIdentifiers(eventIdsPair.getLeft());
identifiers.setLastServerVersion(eventIdsPair.getRight());
Expand Down Expand Up @@ -682,8 +682,8 @@ public ResponseEntity<ByteArrayResource> exportEventData(@RequestParam List<Stri
logger.info("Temp DIR is =============" + tempDirectory);
for (String eventType : eventTypes) {
ExportEventDataSummary exportEventDataSummary = eventService
.exportEventData(planIdentifier, eventType, Utils.getDateTimeFromString(fromDate),
Utils.getDateTimeFromString(toDate));
.exportEventData(planIdentifier, eventType, Utils.getDateFromString(fromDate),
Utils.getDateFromString(toDate));

missionName = exportEventDataSummary != null &&
exportEventDataSummary.getMissionName() != null ?
Expand Down Expand Up @@ -757,7 +757,7 @@ private boolean exportImagesAgainstFlagProblemEvent(String eventType, String pla

ExportImagesSummary exportImagesSummary =
eventService.getImagesMetadataForFlagProblemEvent(planIdentifier, eventType,
Utils.getDateTimeFromString(fromDate), Utils.getDateTimeFromString(toDate));
Utils.getDateFromString(fromDate), Utils.getDateFromString(toDate));
String imagesDirectoryName;
if (firstTime) {
formatted = df.format(new Date());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/opensrp/web/rest/LocationResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public ResponseEntity<Identifier> findIds(
@RequestParam(value = "toDate", required = false) String toDate) {

Pair<List<String>, Long> structureIdsPair = locationService.findAllStructureIds(serverVersion, DEFAULT_GET_ALL_IDS_LIMIT,
Utils.getDateTimeFromString(fromDate), Utils.getDateTimeFromString(toDate));
Utils.getDateFromString(fromDate), Utils.getDateFromString(toDate));
Identifier identifiers = new Identifier();
identifiers.setIdentifiers(structureIdsPair.getLeft());
identifiers.setLastServerVersion(structureIdsPair.getRight());
Expand Down Expand Up @@ -525,7 +525,7 @@ public ResponseEntity<Identifier> findLocationIds(
@RequestParam(value = "toDate", required = false) String toDate) {

Pair<List<String>, Long> locationIdsPair = locationService.findAllLocationIds(serverVersion, DEFAULT_GET_ALL_IDS_LIMIT,
Utils.getDateTimeFromString(fromDate), Utils.getDateTimeFromString(toDate));
Utils.getDateFromString(fromDate), Utils.getDateFromString(toDate));
Identifier identifiers = new Identifier();
identifiers.setIdentifiers(locationIdsPair.getLeft());
identifiers.setLastServerVersion(locationIdsPair.getRight());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/opensrp/web/rest/PlanResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public ResponseEntity<Identifier> findIds(@RequestParam(value = SERVER_VERSIOIN,
@RequestParam(value = "toDate", required = false) String toDate) {

Pair<List<String>, Long> planIdsPair = planService.findAllIds(serverVersion, DEFAULT_GET_ALL_IDS_LIMIT, isDeleted,
Utils.getDateTimeFromString(fromDate), Utils.getDateTimeFromString(toDate));
Utils.getDateFromString(fromDate), Utils.getDateFromString(toDate));
Identifier identifiers = new Identifier();
identifiers.setIdentifiers(planIdsPair.getLeft());
identifiers.setLastServerVersion(planIdsPair.getRight());
Expand Down
Loading