Skip to content

chore: remove dhis-api EventService.addEvent DHIS2-17677 #17917

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 1 commit into from
Jul 2, 2024

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Jun 28, 2024

Follow up to #17916

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.addEvent was only used in the EventService itself (inlined) and tests. DhisConvenienceTest base class already has a createEvent that fulfilled most of what the tests relied on.

Store the event via the IdentifiableObjectManager as we do for many other test
fixtures.

@teleivo teleivo changed the title Dhis2 17638 3 chore: remove dhis-api EventService.addEvent DHIS2-17638 Jun 28, 2024
@teleivo teleivo force-pushed the DHIS2-17638-3 branch 2 times, most recently from aea83a9 to 5f823a0 Compare July 1, 2024 05:58
@teleivo teleivo changed the title chore: remove dhis-api EventService.addEvent DHIS2-17638 chore: remove dhis-api EventService.addEvent DHIS2-17677 Jul 1, 2024
@teleivo teleivo force-pushed the DHIS2-17638-3 branch 4 times, most recently from f770e9b to 6d79239 Compare July 2, 2024 07:25
@teleivo teleivo marked this pull request as ready for review July 2, 2024 07:25
@teleivo teleivo requested a review from a team July 2, 2024 07:25
@teleivo teleivo enabled auto-merge (squash) July 2, 2024 07:27
as except for 1 usage in the EventService itself (inlined) it was only
used in tests.
Copy link

sonarqubecloud bot commented Jul 2, 2024

@enricocolasante enricocolasante requested a review from a team July 2, 2024 08:50
@teleivo teleivo merged commit 51d18bd into master Jul 2, 2024
15 checks passed
@teleivo teleivo deleted the DHIS2-17638-3 branch July 2, 2024 09:35
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