Page MenuHomePhabricator

Engage import error - duplicate contribution, but not duplicate
Closed, ResolvedPublic

Description

We are getting this error, but are not sure why because it doesn't seem like the two transactions are duplicates:

https://civicrm.wikimedia.org/civicrm/search#/display/Import_3367/Import_3367?_status=ERROR

Event Timeline

Lars moved this task from Triage to Chaos Crew Backlog on the Fundraising-Backlog board.

@MDemosWMF So it turns out we are generating a "unique" gateway transaction id based on the check number (here empty), donor name, date and import row number. But obviously in the case of the anonymous donor, that's not unique enough! I will fix this, but in the meantime I have imported this transaction by changing the date in the import and then reverting it back to the correct value after importing.

@Lars Thank you! Glad you were able to find out what it was.

XenoRyet triaged this task as Medium priority.Oct 27 2025, 7:41 PM

Change #1199061 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Ensure generated transaction reference is unique

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

Change #1199061 merged by Eileen:

[wikimedia/fundraising/crm@master] Ensure generated transaction reference is unique

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

@MDemosWMF This has now been deployed, so you shouldn't see any of these types of errors. Just bear in mind that if you import a file without a batch number, there is nothing to protect you from accidentally re-importing it, like there used to be.

AKanji-WMF set Final Story Points to 2.