Page MenuHomePhabricator

Fix WMF_donor rollup calculations to use financial transactions
Closed, ResolvedPublic1 Estimated Story Points

Description

Contact custom fields in WMF_Donor are currently calculated in an edit hook on Contributions. The calculations need to be based on the financial transaction tables. Does the hook also need to run on those tables?

Event Timeline

Ejegg raised the priority of this task from to Needs Triage.
Ejegg updated the task description. (Show Details)
Ejegg subscribed.

Change 269587 had a related patch set uploaded (by Eileen):
Update contribution_post hook to look at transaction totals

https://gerrit.wikimedia.org/r/269587

I added a patch to the post to fix the usd lifetime total - I think it's enough to call it from contribution post hook.

I'm on the fence about how to handle other fields in the set.

The fields are

Last donated
Last USD amount
Donated in year x
Last original amount
Last currency

It feels like we need to look back to the last contribution that stays completed (ignore refunds)

Change 269587 merged by Eileen:
Update contribution_post hook to look at transaction totals

https://gerrit.wikimedia.org/r/269587