Page MenuHomePhabricator

Contacts and Imported gifts going straight to trash after import
Closed, ResolvedPublic2 Estimated Story Points

Description

Please bear with me as I explain this :)

Last week Leanne and I found a gift that had come through the Engage import files that somehow didn't actually make it into Civi. The import created the new donor and logged the contribution and then deleted the entire record. I restored it and the reporting numbers looked great. The only reason we found it was because it was over $1K and we always go back and look at these after import.

I just imported this week's engage file and the only $1K gift we had made into civi - no problem. So instead I did a Contact search selecting "Search in Trash" and contribution dates 8/27/18- now.
This returned 7 donors -
5 being contributions I had just imported the others are recurring donors.
It looks like it imported it, merged the record, but didn't move the new gift over. This is the ID for the records that stayed in Civi 14650205, 14129019, 22652379, 10445129 - they are both missing the gift I just imported. This one is not in civi at all 10816511.
Also, the import said successful.

Event Timeline

NNichols updated the task description. (Show Details)
NNichols updated the task description. (Show Details)

@NNichols can you put the original import files up on the fileshare?

@Ejegg I just placed the latest files on the server: Tech/Major Gifts/Engage Import/Trashed donations

So it looks like CID 10816511 has been deleted for as long as we've been logging changes, but somehow the import decided to match on that. Donation ID 30651458 has a single log entry, showing it was inserted against that contact ID (When a donation is merged from one contact to another, it gets an 'Update' log entry showing the change in contact_id).

But as far as I know, the Engage import shouldn't be trying to match on existing donors at all... It's only Benevity that tries to match existing donors, right?

Change 462044 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] Ensure we're not matching on deleted contacts

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

Ooh, the Engage import DOES match existing donors... I think that patch should help, but I'll do some more testing Monday.

Change 462044 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Ensure we're not matching on deleted contacts

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

Ok @NNichols and @LeanneS , there's a fix up for both Benevity and Engage imports so they should never match on deleted contacts. Please let us know if you want tech to help with restoring any of the old donations imported against deleted contacts.

I was able to restore all of the gifts that came from engage but if I run the same search going back to 1/1/2016 there are about 282 contacts in the trash. Not sure how we would go through these to see which ones need to be restored.

@NNichols I added a follow on subtask for the other ones. T205941 - this is maybe closable now ?

Yes I saw the subtask. I think this is closable.