fix(sync): restore congregation field service reports for elders and overseers - #5382
Open
ux-git wants to merge 1 commit into
Open
fix(sync): restore congregation field service reports for elders and overseers#5382ux-git wants to merge 1 commit into
ux-git wants to merge 1 commit into
Conversation
…overseers The backup worker granted elders, group overseers and language group overseers the right to upload cong_field_service_reports, but the restore gate only accepted admins, secretaries, coordinators and holders of the pocket-only `publisher` role. Those users received the reports from the API and silently dropped them, while the metadata version still advanced, so the data was never requested again — and their stale local table was then pushed back, overwriting reports other users had just synced. Resolve the report editor roles once and use that helper for the restore gate, the export gate and the metadata sent to the API. Sending the cong_field_service_reports version again also re-arms the API check that rejects outdated backups for these roles. Clear that version once on upgrade so clients that dropped reports pull them on the next sync instead of trusting a version they never applied.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
@rhahao can you please take a deeper look and verify if the fix is valid? |
|
This was referenced Sep 1, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
Elders, group overseers and language group overseers never receive congregation field service reports through sync, and can silently overwrite the reports of other users.
dbExportDataBackuplets those roles uploadcong_field_service_reports, and the API sends the table to them (reportEditorRole). ButdbRestoreCongReportsgated the restore onadminRole || publisherRole, wherepublisheris a pocket-only role that VIP accounts usually do not carry. So those users:cong_field_service_reportsmetadata version, so the data was never requested again,This is the mismatch behind #5055: the second user keeps syncing and never sees the reports.
The restore gate lost its group overseer branch in f200e6b when the dedicated
group_overseersrole was introduced, and was never given the new role.What this changes:
cong_field_service_reportsversion for those roles again, which also re-arms the API check that rejects outdated backupsFixes #5055
Type of change
Checklist: