Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we don't get previously set honoree values in receipts #21483

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

jmcclelland
Copy link
Contributor

Overview

When processing a series of recurring contributions, the honoree info from previously processed contributions show up in the receipts of contributions processed later.

@adixon @KarinG - We encountered this bug with a group using Iats - and it may impact Iats more then other payment processors because Iats processes recurring contributions in single run rather then via individual webhook calls.

Before

When running a series of recurring contributions, if a contribution includes an honoree (soft credit), then that honoree will show up in all subsequent receipts that do not specify an honoree.

Here's what the first (correct) receipt looks like:

correct-receipt

And a later (incorrect) receipt might look like this:

incorrect-receipt

After

By manualling clearing the variable, the incrrect data does not show up.

Technical Details

This behavior and fix are tested against 5.39. I'm sure I should submit a test to lock it in, but am a bit overwhelmed by all the moving parts of setting up the recurring contribution, checking the email etc.

…eipts.

When processing a series of recurring contributions, the honoree info
from previous contributions show up in the receipts of later
contributors.
@civibot
Copy link

civibot bot commented Sep 15, 2021

(Standard links)

@civibot civibot bot added the master label Sep 15, 2021
@eileenmcnaughton
Copy link
Contributor

@jmcclelland yeah lots of stuff moving here at the moment - I'll try to review this & likely alter to move with the parts...

@demeritcowboy
Copy link
Contributor

This seems ok to me.
Regarding a test it might be possible to do some basic setup with two regular non-recurring contributions, the first with soft-credit, and then just call static function sendEmail twice.

Minor notes:

  • honorName doesn't seem to be used in the receipt, only on the confirmation/thanks page, but I see no harm setting it to null here.
  • some param weirdness, passing a Smarty to formatHonoreeProfileFields() when it's expecting a form, but they happen to both have assign() functions that do the same thing.

@demeritcowboy demeritcowboy merged commit 9abd9c0 into civicrm:master Jan 5, 2022
@eileenmcnaughton
Copy link
Contributor

Thanks - I definitely hadn't gotten around to doing a better fix so good to have something in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants