When a Contact or Account has an existing gift, that is not in a Closed state, Gift Entry is matching to that gift upon Save via the Dry Run. By default the Custom Setting in Custom Settings being referenced by: bdi.diSettings.Donation_Matching_Rulec from Data_Import_Settingsc, are set to "Do Not Match". As Gift Entry no longer navigates to the "Start Import" page after the most recent release, we do not see the same page that we used to; the same one that is still present when importing records through the NPSP Data Importer. Regardless, the Contact and Donation matching rules are meant to respect the Setup > Custom Code > Custom Settings > Data Import Settings > Donation Matching Behaviour, but instead the Gift Entry code is interpreting the Dry Run-matched Opportunities as User Input, and therefore matching them to the Opportunity anyway.
Steps to Reproduce
Create a new contact: Test SFDC with the contact record type. Leave all fields as is aside from first and last name
Create a Gift Entry template that includes Stage as a field on the template
Go to Gift Entry >> Click New Batch >> Select General Gift Entry >> Click Next >> Batch Name: New Test1 -> Next >> Leave the default values as is and click save
Fill in the below details:
a. Opportunity Record Type: Donation
b. Data Import: Donation Donor: Contact1
c. Data Import: Contact1 Imported: Test SFDC
d. Opportunity: Amount: $100
e. Opportunity: Close Date: 08/17/2021
f. Opportunity: Stage: Prospecting
Select "Save & Enter New Gift"
Select "Process Batch"
Go to Gift Entry >> Click New Batch >> Select General Gift Entry >> Click Next >> Batch
Name: New Test2 >> Leave the default values as is and click save
Fill in the below details:
a. Opportunity Record Type: Donation
b. Data Import: Donation Donor: Contact1
c. Data Import: Contact1 Imported: Test SFDC
d. Opportunity: Amount: $100
e. Opportunity: Close Date: 08/17/2021
f. Opportunity: Stage: Prospecting
Select "Save & Enter New Gift"
Select "Process Batch"
Open up the gifts created from the process batch import for both of the donations and notice they are the same
Actual Results: One donation is created.
Expected Results: Two donations are created
Cause
The code that is used to check if there is a User-selected match on a DI record, is taking the fact that Dry Run is running as a means to populate the Donation_Imported__c field on the DI record
However, running the Dry Run as a standalone function via the NPSP Data Importer does not populate the Donation Imported field as it is respecting the chosen matching settings which by default are set to "Do Not Match"
Workaround
If a User goes directly to the NPSP Data Importer records that are created by their entries in Gift Entry, and clears out the fields for Donation Imported, Donation Import Status, Payment Imported, and Payment Import Status; and then returns to the Gift Entry batch to process the batch, then new records will be generated as expected instead of updating the records that they were referencing.
Issue
When a Contact or Account has an existing gift, that is not in a Closed state, Gift Entry is matching to that gift upon Save via the Dry Run. By default the Custom Setting in Custom Settings being referenced by: bdi.diSettings.Donation_Matching_Rulec from Data_Import_Settingsc, are set to "Do Not Match". As Gift Entry no longer navigates to the "Start Import" page after the most recent release, we do not see the same page that we used to; the same one that is still present when importing records through the NPSP Data Importer. Regardless, the Contact and Donation matching rules are meant to respect the Setup > Custom Code > Custom Settings > Data Import Settings > Donation Matching Behaviour, but instead the Gift Entry code is interpreting the Dry Run-matched Opportunities as User Input, and therefore matching them to the Opportunity anyway.
Steps to Reproduce
Actual Results: One donation is created. Expected Results: Two donations are created
Cause
The code that is used to check if there is a User-selected match on a DI record, is taking the fact that Dry Run is running as a means to populate the Donation_Imported__c field on the DI record
https://github.com/SalesforceFoundation/NPSP/blob/5363fa8f8ae3ef46a5f305c49e7af4e492a4f0cf/force-app/main/default/classes/BDI_MatchDonations.cls#L174
However, running the Dry Run as a standalone function via the NPSP Data Importer does not populate the Donation Imported field as it is respecting the chosen matching settings which by default are set to "Do Not Match"
Workaround
If a User goes directly to the NPSP Data Importer records that are created by their entries in Gift Entry, and clears out the fields for Donation Imported, Donation Import Status, Payment Imported, and Payment Import Status; and then returns to the Gift Entry batch to process the batch, then new records will be generated as expected instead of updating the records that they were referencing.