Page MenuHomePhabricator

wmf_contribution_extra table is inserted twice for a single contribution insert
Closed, ResolvedPublic2 Estimated Story Points

Description

First on the contribution post hook, when we add the gateway, , gateway_txn_id, original_amount, original_currency, and entity_id.

Then after that, the Contribution save process continues and inserts the source_ fields from the message (with an on duplicate key update).

Maybe we can move the _post hook logic to a _pre hook that just sets the derived parameters for the normal save process to work with?

Event Timeline

Change 458333 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] WIP move _extra field calc to pre hook

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

Ejegg triaged this task as Medium priority.
Ejegg moved this task from Triage to Current Sprint on the Fundraising-Backlog board.
Ejegg set the point value for this task to 2.

Change 458333 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move _extra field calc to pre hook

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

mepps subscribed.

@Ejegg I'm moving this into pending deployment under the assumption that the merged patch fixes the issue.

Eileenmcnaughton subscribed.

I don't think anyone other than us will input here so changing to resolved