Page MenuHomePhabricator

Remove duplicate refunded status & transfer contributions with this status to the original Refunded status
Closed, ResolvedPublic2 Story Points


There are 1186 contributions currently affected

I propose to

remove the extra financial trxns for these rows
update the contribution_status_id on civicrm-contribution & civicrm-financial_trxn

SET @originalRefundStatus = 9;
SET @duplicateRefundStatus = 10;

DELETE FROM civicrm.civicrm_financial_trxn WHERE status_id = @duplicateRefundStatus;

UPDATE civicrm_contribution SET contribution_status_id = @originalRefundStatus WHERE contribution_status_id = @duplicateRefundStatus;

Event Timeline

Eileenmcnaughton claimed this task.
Eileenmcnaughton raised the priority of this task from to Needs Triage.
Eileenmcnaughton updated the task description. (Show Details)
Eileenmcnaughton added a subscriber: Eileenmcnaughton.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 12 2016, 12:19 AM

This upgrade hook is to fix records that look like this

By removing the surplus transaction and changing the status from {new} refunded to {old} refunded



Contact ID = 13350869

Note that after only 1 Refunded status exists and it can only be used for changing an existing contribution (you can't enter as refunded you can only refund an existing payment)

I have run this on Staging

Eileenmcnaughton edited a custom field.
Eileenmcnaughton closed this task as Resolved.Feb 16 2016, 12:30 AM

I am self closing this as it is a subtask I logged

mmodell removed a subscriber: awight.Jun 22 2017, 9:42 PM