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: Rename endDate to completedDate in service layer [TECH-1665] #15652

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

enricocolasante
Copy link
Contributor

@enricocolasante enricocolasante commented Nov 11, 2023

completedAt field in Enrollment was internally translated to endDate.
This PR aims to replace all occurrences of endDate in the service layer to completedDate.
The general rule that we are using is that date fields are suffixed with At in the API and then suffixed with Date in the service and the DB layer.

Next PRs

  • Rename occurredAt in service layer
  • Rename completedAt in DB layer
  • Rename occurredAt in DB layer

Copy link

sonarcloud bot commented Nov 11, 2023

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

@enricocolasante enricocolasante marked this pull request as ready for review November 11, 2023 15:06
Copy link

codecov bot commented Nov 11, 2023

Codecov Report

Merging #15652 (c941746) into master (21d1572) will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@            Coverage Diff            @@
##             master   #15652   +/-   ##
=========================================
  Coverage     66.21%   66.21%           
  Complexity    31267    31267           
=========================================
  Files          3487     3487           
  Lines        129904   129904           
  Branches      15170    15170           
=========================================
+ Hits          86013    86014    +1     
+ Misses        36812    36811    -1     
  Partials       7079     7079           
Flag Coverage Δ
integration 49.78% <68.75%> (+<0.01%) ⬆️
integration-h2 32.40% <25.00%> (-0.01%) ⬇️
unit 30.32% <31.25%> (ø)

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

Files Coverage Δ
...rc/main/java/org/hisp/dhis/program/Enrollment.java 94.53% <100.00%> (ø)
...er/export/enrollment/DefaultEnrollmentService.java 62.17% <100.00%> (ø)
...er/export/enrollment/HibernateEnrollmentStore.java 84.78% <ø> (ø)
...ggregates/mapper/EnrollmentRowCallbackHandler.java 97.77% <100.00%> (ø)
...er/tracker/export/enrollment/EnrollmentMapper.java 100.00% <100.00%> (ø)
...er/export/relationship/RelationshipItemMapper.java 100.00% <ø> (ø)
...rg/hisp/dhis/program/DefaultEnrollmentService.java 53.20% <50.00%> (ø)
.../tracker/enrollment/AbstractEnrollmentService.java 55.54% <75.00%> (ø)
...ker/importer/shared/validation/EventBaseCheck.java 74.35% <50.00%> (ø)
...s/converter/EnrollmentTrackerConverterService.java 70.17% <50.00%> (ø)

... and 3 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 21d1572...c941746. Read the comment docs.

@enricocolasante enricocolasante enabled auto-merge (squash) November 11, 2023 15:09
@muilpp
Copy link
Contributor

muilpp commented Nov 12, 2023

just out of curiosity, is there a plan to name all these fields the same regardless of the layer they live in?
for instance, will we choose between completedAt or completedDate and use either of them everywhere?

@@ -32,7 +32,7 @@

<property name="enrollmentDate" column="enrollmentdate" not-null="true"/>

<property name="endDate" column="enddate"/>
<property name="completedDate" column="enddate"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enrollmentDate is mapped to enrollmentdate column. Can we do the same for completedDate?

@enricocolasante enricocolasante merged commit 270ca56 into master Nov 13, 2023
18 checks passed
@enricocolasante enricocolasante deleted the TECH-1665 branch November 13, 2023 07:08
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