Page MenuHomePhabricator

Add recurring donors whose recurring donations don't yet have a donation attached to recurring segments & statuses
Open, Needs TriagePublic

Description

These would be for post-payment recurring convert donors.

Because our segment and status updates are based on contribution table triggers, these are not currently included in recurring segments and statuses. Current impact for annual recurring donors is ~500, but expected to grow.

Event Timeline

The nub of the difficulty here is that our status calculation code generates SQL which uses the civicrm_contribution table as a base, while these donors have no entries in there linked to the civicrm_contribution_recur table yet. If we were to create template contributions for pending recurring contributions as mentioned in the core docs: https://docs.civicrm.org/dev/en/latest/financial/recurring-contributions/ we would have something to join on. Then we would have to adjust where we apply the filters on civicrm_contribution_status, which is 1 for completed contributions and 14 for templates.

See existing ticket T291449: Use CiviCRM template contributions for recurring donations for further reasons to use template contributions.

An alternative would be to make an ad-hoc adjustment to the sql after it is generated but that seems like a bad idea for maintainability.

@Ejegg I suggest we tackle this as part of the donor segment & status refresh that is planned to have in place for the start of the new fiscal, as there will likely be other related changes, e.g. changing donor status when a recurring is cancelled. Moving to Later.

Ejegg removed Ejegg as the assignee of this task.Mar 10 2026, 9:26 PM