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: Use createdAt as secundary sorting param [DHIS2-18093] #18736

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

enricocolasante
Copy link
Contributor

@enricocolasante enricocolasante commented Oct 3, 2024

Upgrade rule-engine library and change mapping to rule-engine model in order to comply with API changes.

  • Rule-engine model was not mapping correctly the createdDate field. Here that is fixed hardcoding the right createdDate coming from the preheat event if it is an UPDATE. If it is a CREATE, everything works fine.

A more comprehensive fix will come later as this PR needs to be backported and it is enough to fix the issue.

Next steps
There are too many mappings between models and some logic is not correct. These mappings were necessary before, when rule-engine logic was in a different module, now we can just directly mapping from our tracker model (org.hisp.dhis.tracker.imports.domain) to rule-engine model (org.hisp.dhis.rules.models) without passing through API model (org.hisp.dhis.program) .

@enricocolasante enricocolasante force-pushed the DHIS2-18093-to-backport branch from 524b69a to 1024c8c Compare October 3, 2024 12:47
@enricocolasante enricocolasante force-pushed the DHIS2-18093-to-backport branch 2 times, most recently from ff7eec0 to b8f4bcb Compare October 4, 2024 08:34
@enricocolasante enricocolasante marked this pull request as ready for review October 4, 2024 08:58
@enricocolasante enricocolasante requested a review from a team as a code owner October 4, 2024 08:58
@enricocolasante enricocolasante requested a review from a team October 4, 2024 12:03
@enricocolasante enricocolasante enabled auto-merge (squash) October 4, 2024 12:03
@enricocolasante enricocolasante force-pushed the DHIS2-18093-to-backport branch from b8f4bcb to 77d421c Compare October 4, 2024 12:31
Copy link

sonarqubecloud bot commented Oct 4, 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.

2 participants