SalesforceFoundation / NPSP

The current version of the Salesforce.org Nonprofit Success Pack
http://www.salesforce.org/nonprofit/nonprofit-success-pack/
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Legacy Rollups Calculating Installments for Open-Ended Recurring Donations #3902

Closed jesslopez-sf closed 4 years ago

jesslopez-sf commented 5 years ago

When Customizable Rollups were released, we made changes to how legacy rollups ran on open-ended Recurring Donations. In our documentation, we state that the Installments field is not used for Open-Ended, yet now it is calculated. This behavior is not only different from how it functioned in the past, but is also different from how Customizable Rollups function (i.e. in Customizable Rollups, we do not update this field and prevent new rollups from being created for that field). Is it possible to match the behavior between both rollup systems and revert legacy rollups so that they do not update the Installments field?

Within the RD_RecurringDonations class, we are checking if CRLPS are enabled, and then set the Installments in the following block of code:

if (isClosed == null && isWon == null && rd.npe03__open_ended_status__c == system.label.npe03.RecurringDonationOpenStatus) {
     rd.npe03__Installments__c = (integer) obj.get('oppcount');
     updateMap.put(rdid, rd);
}

Steps to Repeat: Legacy Rollups

  1. Verify that Customizable Rollups are not enabled in NPSP Settings --> Donations -->Customizable Rollups.
  2. Create a Contact (First Name = Jess, Last Name = Lopez)
  3. Create a Recurring Donation for that Contact (Name = RD Test 1, Contact = Jess Lopez, Amount = 10, Open Ended Status = Open, Date Established = Today, Installment Period = Monthly). Hit Save.
  4. The Installments field on the Recurring Donation record is set to 12.

Customizable Rollups

  1. Go to NPSP Settings --> Donations -->Customizable Rollups and enable Customizable Rollups.
  2. Create a Recurring Donation for the existing Contact (Name = RD Test 2, Contact = Jess Lopez, Amount = 25, Open Ended Status = Open, Date Established = Today, Installment Period = Monthly). Hit Save.
  3. The Installments field on the Recurring Donation record is set to 1.
jesslopez-sf commented 5 years ago

**lurch: add

LurchTheButler commented 5 years ago

Tracking W-030403