fix: Use createdAt as secundary sorting param [DHIS2-18093] #18736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade rule-engine library and change mapping to rule-engine model in order to comply with API changes.
createdDate
field. Here that is fixed hardcoding the rightcreatedDate
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
) .