-
Notifications
You must be signed in to change notification settings - Fork 359
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
feat: add prev/nextPage to /tracker/trackedEntities DHIS2-19021 #20031
base: master
Are you sure you want to change the base?
Conversation
8816f18
to
91a377f
Compare
|
params.setMaxTeLimit(maxTeiLimit); | ||
int maxTeLimit = getMaxTeLimit(params); | ||
checkIfMaxTeLimitIsReached(params, maxTeLimit); | ||
params.setMaxTeLimit(maxTeLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you move this like one up, then you don't need to send the maxTeLimit
as a parameter to the checkIfMaxTeLimitIsReached
function anymore, as it is already contained in the params
parameter.
private void checkIfMaxTeiLimitIsReached(TrackedEntityQueryParams params, int maxTeiLimit) { | ||
if (maxTeiLimit > 0) { | ||
private void checkIfMaxTeLimitIsReached(TrackedEntityQueryParams params, int maxTeLimit) { | ||
if (maxTeLimit > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NitPicky, but if the maxTeLimit
is not sent as an additional parameter, and if reusing the one inside params
, a method like hasMaxTeLimit
inside TrackedEntityQueryParams
could be used here instead, that does the same check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should not have renamed the existing code 😂
following #20029
This change affects paginated TE search when there is no TE limit setup
dhis2-core/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java
Lines 1072 to 1083 in daa6d01
I need to investigate how pagination affects the TE limit that in configurable in some way
dhis2-core/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/HibernateTrackedEntityStore.java
Lines 1083 to 1094 in daa6d01
I'll do this in another PR. I first need to figure out how to test it.