Hide 'Last Updated' for offline organizations#1939
Open
jbirdjavi wants to merge 1 commit into
Open
Conversation
Offline orgs never download data, but the nightly import still stamps person_organization_accounts.last_download on a no-op run, so the Organizations settings panel advertised a fresh 'Last Updated' time on cards that had never received anything. This masked dead DonorHub connections for migrated Wycliffe users, who read the offline card as healthy. Gate the 'Last Updated' row on the org type already computed in the component, matching the existing Sync/Import button gating. 'Last Gift Date' still renders for offline orgs as the honest signal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HcHZJWUKidBEU4h6s8urtV
Contributor
Bundle sizes [mpdx-react]Compared against ea57016 No significant changes found |
canac
approved these changes
Jul 23, 2026
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.
Problem
Offline organizations (e.g. "Wycliffe Bible Translators USA") never download data — they only ever receive a manually-uploaded TntConnect DataSync file. But the nightly import job still runs against them and stamps
person_organization_accounts.last_downloadon that no-op run, so Settings → Integrations → Organizations showed a fresh "Last Updated — X hours ago" on cards that had never actually received anything.For migrated Wycliffe users who hold both an offline "Wycliffe Bible Translators USA" card and the real "Wycliffe USA (DonorHub)" card, this made the offline card look healthy and masked a broken DonorHub sync — the exact confusion reported in HS-1683554 / HS-1686072.
Root cause
In mpdx-api,
Person::OrganizationAccount#import_all_dataunconditionally writeslast_download: Time.currentafterimport_donations, even when the org'simport_allis a no-op (OfflineOrg#import_alldoes nothing). The once-per-day import guard makes the value read as "earlier today," every day. That timestamp is a legitimate operational fact ("the import job last completed") for the code that consumes it, but the UI mislabels it as "Last Updated" for orgs where it means nothing.Fix
Gate the "Last Updated" row on the org
typealready computed in the component, matching the existing Sync/Import-button gating a few lines above:"Last Gift Date" still renders for offline orgs — that's the honest signal for a file-import org.
This is deliberately a presentation-layer fix.
last_downloadstays correct as "import job last completed" for the throttle (future_last_download?), fan-out ordering (with_linked_org_accounts), and login queue (queue_imports) that rely on it. A separate backend perf follow-up could stop queuing offline orgs for import at all, but that's out of scope here.Testing
should render Offline Organizationto assert "Last Updated" is absent for an offline org (it previously asserted present — the test encoded the bug).should render Ministry Account Organizationthat "Last Updated" is present for a non-offline org (guards against over-gating).OrganizationAccordion.test.tsxpass; verified red→green and that the change is caught if the gate is wrong in either direction.🤖 Generated with Claude Code
https://claude.ai/code/session_01HcHZJWUKidBEU4h6s8urtV