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

[OCG] [fix] On tracker TEIs sync, copy only teis updated [DHIS2-15223] #70

Open
wants to merge 1 commit into
base: 2.37.8.1-upstream
Choose a base branch
from

Conversation

tokland
Copy link

@tokland tokland commented Feb 21, 2024

On 2.37.8.1, all TEIs are synced on the job sync, even if they were already synced before. This worked for 2.33.5, so let's compare:

https://github.com/dhis2/dhis2-core/blob/2.37.8.1/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java#L603

https://github.com/dhis2/dhis2-core/blob/2.33.5/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java#L264

The problems is that the condition "tei.lastUpdated > tei.lastSynchronized" when params.isSynchronizationQuery()" was removed. Checking git history, this logic was changed here (first affected version: 2.37.3):

dhis2@ed1a022#diff-f960125887353fe285946328173a4e612632e40c0bca283e9d30c824348764dbL383

And the logic was reinstated here (first version fixed: 2.38.4, not backported to 2.37):

dhis2@946c066#diff-f960125887353fe285946328173a4e612632e40c0bca283e9d30c824348764dbR663

Associated JIRA issue: https://dhis2.atlassian.net/browse/DHIS2-15223

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@tokland tokland changed the base branch from master to 2.37.8.1-upstream February 21, 2024 10:07
@adrianq adrianq changed the title [fix] On tracker TEIs sync, copy only teis updated [DHIS2-15223] [OCG] [fix] On tracker TEIs sync, copy only teis updated [DHIS2-15223] Nov 21, 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