Skip to content

[FIX] thankyou_letters: standard thank you for mixed donations - #2218

Open
davidwul wants to merge 1 commit into
18.0from
fix-thankyou-mixed-config
Open

davidwul wants to merge 1 commit into
18.0from
fix-thankyou-mixed-config

Conversation

@davidwul

Copy link
Copy Markdown
Contributor

Problem

When several donations are thanked together (e.g. a MyCompassion basket ends up in a single invoice), the thank you config was chosen with mapped("product_id.partner_communication_config"). mapped drops the empty values, so a product without a specific config (e.g. Child gift, thanked with the standard letter) was ignored: a child gift paid together with a Christmas Gift was thanked with the Christmas letter.

Fix

  • A product without a thank you config counts as the standard config (thankyou_letters.config_thankyou_standard).
  • A specific thank you is used only when all the donations ask for the same one; mixed donations get the standard thank you.
  • A config forced by the context (event donations) is unchanged.

Tests

New test_thankyou_mixed_config.py (AccountTestInvoicingCommon):

  • same specific config → specific thank you
  • gift + Christmas → standard thank you with both lines (fails without the fix)
  • two different specific configs → standard thank you

🤖 Generated with Claude Code

A product without a thank you config was left out when choosing the
config, so a child gift paid with a Christmas donation (e.g. a
MyCompassion basket in one invoice) was thanked with the Christmas
letter. A product without config now counts as standard, and donations
asking for different configs get the standard thank you.

Assisted-by: claude-opus-5-5, medium, claude-code
@davidwul
davidwul requested a review from ecino November 17, 2026 15:30
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Reviews (1) · Last reviewed commit: "[FIX] thankyou_letters: standard thank y..." · Reviewed by Greptile

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