Skip to content

Conversation

@Betree
Copy link
Member

@Betree Betree commented Oct 13, 2025

@Betree Betree self-assigned this Oct 13, 2025
resultsByKey[key] = donated + totalAmount;
});
return keys.map(key => {
return resultsByKey[`${key.FromCollectiveId}-${key.CollectiveId}-${key.currency}`] || 0;

Choose a reason for hiding this comment

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

Potential bug: The totalAmountDonatedFromTo loader now filters by currency, causing it to underreport totals for collectives that have changed their currency over time.
  • Description: The totalAmountDonatedFromTo loader was modified to group and filter transactions by currency. However, call sites provide the collective's current currency. Since collectives can change their currency over time (e.g., when changing hosts), this new logic will exclude any historical transactions made in a different currency. For example, if a collective switches from EUR to USD, any prior donations made in EUR will be ignored when calculating the total, leading to underreported donation amounts. This affects financial reporting and the member donation totals displayed in the UI.

  • Suggested fix: Modify the loader to sum all transactions between a donor and a collective, regardless of currency. This likely involves removing the currency field from the GROUP BY and WHERE clauses of the underlying query. The loader should aggregate totals across all currencies to provide a complete historical sum.
    severity: 0.75, confidence: 0.98

Did we get this right? 👍 / 👎 to inform future reviews.

@Betree Betree force-pushed the fix/totalAmountDonatedFromTo-currency branch 2 times, most recently from 28daa79 to 0b62fb4 Compare October 14, 2025 07:20
@Betree Betree force-pushed the fix/totalAmountDonatedFromTo-currency branch from 0b62fb4 to a0f75e0 Compare October 14, 2025 07:25
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.

Profile page: total amount contributed as tip wrongly using USD

2 participants