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

chore: split fetching all TEs from fetching paginated TEs [TECH-1645] #15475

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

enricocolasante
Copy link
Contributor

@enricocolasante enricocolasante commented Oct 24, 2023

Continuing the work already done for enrollments (#15434) to tracked entities

  • Split fetching all tracked entities from all tracked entity pages by extracting a PageParam class that contains the defaults for page, pageSize and uses primitive types int, boolean.
  • The controller will then either fetch all or a page of tracked entities based on skipPaging

Next PR(s)

Push the pagination logic we currently have in the service into the repository. This will remove a source of error and make the code cleaner. As right now the repository fetches pageSize+1 if totalPages=false to see if the page is the last page. The service then removes that extra page. All of that will live in the repository.

Update dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/OrderAndPaginationExporterTest.java

chore: split fetching all TEs from fetching paginated TEs [TECH-1661]

chore: split fetching all TEs from fetching paginated TEs [TECH-1661]
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #15475 (180976d) into master (61e7dbd) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 79.06%.

@@             Coverage Diff              @@
##             master   #15475      +/-   ##
============================================
- Coverage     66.16%   66.15%   -0.01%     
  Complexity    31175    31175              
============================================
  Files          3489     3489              
  Lines        129635   129654      +19     
  Branches      15123    15123              
============================================
+ Hits          85773    85774       +1     
- Misses        36775    36792      +17     
- Partials       7087     7088       +1     
Flag Coverage Δ
integration 49.74% <44.18%> (-0.02%) ⬇️
integration-h2 32.44% <74.41%> (+0.02%) ⬆️
unit 30.34% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ort/trackedentity/DefaultTrackedEntityService.java 62.63% <100.00%> (+1.80%) ⬆️
...ckedentity/TrackedEntityOperationParamsMapper.java 89.62% <ø> (-0.38%) ⬇️
...rackedentity/TrackedEntityRequestParamsMapper.java 98.64% <ø> (-0.07%) ⬇️
...trackedentity/TrackedEntitiesExportController.java 72.15% <62.50%> (-10.67%) ⬇️

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61e7dbd...180976d. Read the comment docs.

@enricocolasante enricocolasante merged commit a920c23 into master Oct 26, 2023
18 checks passed
@enricocolasante enricocolasante deleted the TECH-1661 branch October 26, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants