we got some failmails complaining about "Deleted contact with data found", which is a merged cid https://civicrm.wikimedia.org/civicrm/contact/view?cid=70050236&reset=1 has contribution not moved to the merged to cid https://civicrm.wikimedia.org/civicrm/contact/view?reset=1&cid=67348267
Description
Details
Related Objects
- Mentioned In
- T415719: Fundraising Sprint B Priorities
Event Timeline
Had to move over the contribution to the new cid manually, wonder if that's expected or we should move all contribution over when merge cids
This problem was because the contribution was added to a batch entry import before the contacts were merged and then the batch entry import was processed after the merge happened. So the contact id was already stored in the batch and the contribution was added to the trashed contact. It's not actually a merge problem, it's a batch entry import problem. The one from last week that @Damilare handled was the same problem.
We should be able to add a check on the import hook to make sure the contact isn't trashed and getMergedTo if they are.
Upstream PR, makes sense to fix in core for everyone even if it is probably quite a rare case.
Change #1235162 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/crm@master] Get merged to contact for batch entry imports, to prevent import to deleted contact
Change #1235162 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Get merged to contact for batch entry imports, to prevent import to deleted contact