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

Fix: Prioritise payload/bundled events over database events for enrolment[DHIS2-17806] #19330

Draft
wants to merge 1 commit into
base: 2.40
Choose a base branch
from

Conversation

zubaira
Copy link
Contributor

@zubaira zubaira commented Nov 28, 2024

This PR fixes an issue where events linked to an enrollment were being merged from both the database and the tracker bundle payload without prioritizing the payload events. This caused outdated or incorrect events from the database to potentially overwrite the more relavant payload events.

  • Added logic to prioritize events from the tracker bundle payload over events fetched from the database.
  • Combined events efficiently using maps to ensure uniqueness and prioritize payload events when UIDs conflict.

Copy link

sonarcloud bot commented Nov 28, 2024

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.

1 participant