Skip to content

fix: [ANDROAPP-7569] Correct metadata settings refresh#4792

Merged
xavimolloy merged 1 commit into
release/3.4.0-RCfrom
ANDROAPP-7569
Apr 10, 2026
Merged

fix: [ANDROAPP-7569] Correct metadata settings refresh#4792
xavimolloy merged 1 commit into
release/3.4.0-RCfrom
ANDROAPP-7569

Conversation

@xavimolloy
Copy link
Copy Markdown
Collaborator

Description

Link the JIRA issue.

Please provide a clear definition of the problem and explain your solution.

…c metadata settings triggered when job is set to manual initially
Copilot AI review requested due to automatic review settings April 10, 2026 08:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to correct how metadata sync settings are refreshed and how background jobs are (re)scheduled when the metadata sync period changes (notably around “Manual” mode).

Changes:

  • Make SyncRepository.currentMetadataSyncPeriod() nullable and propagate nullability into domain logic.
  • Adjust job scheduling to handle nullable sync periods when launching metadata sync.
  • Increase the periodic cadence for SyncSettingsWorker from daily to hourly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
sync/src/commonMain/kotlin/org/dhis2/mobile/sync/domain/SyncSettings.kt Updates “changed from manual” detection and rescheduling logic using nullable metadata period.
sync/src/commonMain/kotlin/org/dhis2/mobile/sync/domain/SyncMetadata.kt Updates metadata period-change handling to accept nullable periods and reschedule accordingly.
sync/src/commonMain/kotlin/org/dhis2/mobile/sync/data/SyncRepository.kt Changes currentMetadataSyncPeriod() contract to return SyncPeriod?.
sync/src/androidMain/kotlin/org/dhis2/mobile/sync/data/AndroidSyncBackgroundJobAction.kt Changes sync-settings periodic work interval from 1 day to 1 hour.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link
Copy Markdown

@xavimolloy xavimolloy merged commit aa15034 into release/3.4.0-RC Apr 10, 2026
8 checks passed
@xavimolloy xavimolloy deleted the ANDROAPP-7569 branch April 10, 2026 11:52
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