Contribution Detail Report gives incorrect results when `force=1`
To replicate:
- Have at least one soft credit in your database.
- Load a Contribution Detail report instance with
force=1
. In a demo database, you can do this with: http://mysite.org/civicrm/report/instance/8?force=1. - Note the number of records returned.
- Press View Results.
- Note that the number of records has decreased.
As most of us know, the Contribution Detail report has several unfortunate code paths to add soft credits as a special case. This if statement is one of them, and it suppresses soft credit display if the contribution_or_soft_value
param is set to contributions_only
, which is the default.
However, the defaults are not loaded when using force=1
- which means that the default isn't loaded, so soft credits are displayed.
PR incoming that will ensure that if the contribution_or_soft_value
param is empty, then we assume contributions_only
as the default.