Skip to content

chore: remove dhis-api EventService.createEvent DHIS2-17677 #17916

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

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Jun 28, 2024

follow up after #17873

Big picture

Tracker has multiple services for each entity like tracked entity, enrollment and event. One is in dhis-api and one in dhis-service-tracker. Our goal is to provide one API (service) per entity that is part of the tracker domain/team.

Trackers architecture splits read/write into exporter services and an importer. So if you want to get data you use an exporter. If you want to insert, update or delete you have to go through the importer. Only then can we ensure integrity of tracker data.

Another goal is that code that provides tracker functionality and is thus owned by the tracker team lives in ideally one maven module (We can settle on a name later on maybe dhis-service-tracker or dhis-tracker).

This is a big task that we are going to implement in many small steps.

This PR

EventService.createEvent was only used in tests and thus belongs in a test helper. DhisConvenienceTest base class already has a createEvent that fulfilled most of what the tests relied on.

The

programStage.getGeneratedByEnrollmentDate()

was always false so the param enrollmentDate was never used.

Set the default category option combo in the DhisConvenienceTest. Store
the event via the IdentifiableObjectManager as we do for many other test
fixtures created via the DhisConvenienceTest methods.

@teleivo teleivo force-pushed the DHIS2-17638-next branch 2 times, most recently from 21b2c54 to 6f03427 Compare June 28, 2024 11:29
@teleivo teleivo changed the title DHIS2-17638 chore: remove dhis-api EventService.createEvent DHIS2-17638 Jun 28, 2024
@teleivo teleivo force-pushed the DHIS2-17638-next branch from 6f03427 to ba688a4 Compare June 28, 2024 12:22
@teleivo teleivo changed the title chore: remove dhis-api EventService.createEvent DHIS2-17638 chore: remove dhis-api EventService.createEvent DHIS2-17677 Jul 1, 2024
The

programStage.getGeneratedByEnrollmentDate()

was always false so the param enrollmentDate was never used.

Set the default category option combo in the DhisConvenienceTest. Store
the event via the IdentifiableObjectManager as we do for many other test
fixtures created via the DhisConvenienceTest methods.
@teleivo teleivo force-pushed the DHIS2-17638-next branch from ba688a4 to 03970f9 Compare July 1, 2024 08:59
@teleivo teleivo marked this pull request as ready for review July 1, 2024 08:59
@teleivo teleivo requested a review from a team July 1, 2024 09:01
@teleivo teleivo enabled auto-merge (squash) July 1, 2024 09:01
@enricocolasante enricocolasante requested a review from a team July 1, 2024 09:47
Copy link

sonarqubecloud bot commented Jul 1, 2024

@teleivo teleivo merged commit 7bce32c into master Jul 2, 2024
15 checks passed
@teleivo teleivo deleted the DHIS2-17638-next branch July 2, 2024 07:13
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