CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-12-29T05:42:34Zhttps://lab.civicrm.org/dev/core/-/issues/3308Membership end date is miscalculated on recurring payments that fail temporarily2023-12-29T05:42:34ZJonGoldMembership end date is miscalculated on recurring payments that fail temporarilyMembership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment ...Membership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment goes through on time, the membership end date is extended properly to 2020-04-30. However, if the payment fails, Paypal will retry 5 days later. If it goes through at that time, the membership end date will also be extended for 5 days.https://lab.civicrm.org/dev/core/-/issues/3306Expired Membership Renewal Payment w/ Multiple Periods renews incorrectly wit...2023-12-29T05:03:21ZjptillmanExpired Membership Renewal Payment w/ Multiple Periods renews incorrectly with pending paymentI've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry...I've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry in the renewal form)
* Make the payment "Pending" and save. The fees are calculated correctly and the contribution is created as Pending.
* Go to the payment and "Receive payment"
* The membership only rolls forward one period when the contribution is finally completed.
Alternatively, if I make the payment "Complete" when filling out the renewal form (no pending payment), it works fine and rolls the membership forward 2 periods.https://lab.civicrm.org/dev/core/-/issues/4017SearchKit: 500 error when selecting "All Pages" with HAVING clause2023-12-29T03:24:51ZJonGoldSearchKit: 500 error when selecting "All Pages" with HAVING clauseWhen you create a SK query with a HAVING clause, and there is more than one page of contacts, selecting all contacts will give a 500 error.
The following SK will do this quite nicely. The error is some variant on `"Invalid expression i...When you create a SK query with a HAVING clause, and there is more than one page of contacts, selecting all contacts will give a 500 error.
The following SK will do this quite nicely. The error is some variant on `"Invalid expression in HAVING clause: 'MAX_Contact_Contribution_contact_id_01_total_amount'. Must use a value from SELECT clause."`
It seems like selecting "All Pages" causes SK to do an API4 query similar to the original `SavedSearch.run`, but only returning the `id` column (which makes sense). However, this makes using the `HAVING` clause fail.
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "Test",
"label": "500 error test",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"addressee_display",
"display_name",
"MAX(DISTINCT Contact_Contribution_contact_id_01.total_amount) AS MAX_Contact_Contribution_contact_id_01_total_amount",
"GROUP_CONCAT(DISTINCT Contact_Contribution_contact_id_01.source) AS GROUP_CONCAT_Contact_Contribution_contact_id_01_source",
"Connection_to_MHC.Connection_to_MHC",
"MAX(Contact_Contribution_contact_id_01.receive_date) AS MAX_Contact_Contribution_contact_id_01_receive_date"
],
"orderBy": [],
"where": [],
"groupBy": [
"id",
"addressee_id"
],
"join": [
[
"Contribution AS Contact_Contribution_contact_id_01",
"INNER",
[
"id",
"=",
"Contact_Contribution_contact_id_01.contact_id"
]
]
],
"having": [
[
"MAX_Contact_Contribution_contact_id_01_total_amount",
">",
"1"
]
]
},
"expires_date": null,
"description": null
}
],
"match": [
"name"
]
}
]
]
```colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3041SearchKit - Ability to COUNT() without any grouping2023-12-29T03:21:15ZeileenSearchKit - Ability to COUNT() without any groupingWhen using aggregates in search kit the assumptions about when it is good to offer aggregates is a bit off.
Scenario - contact has a custom field of type money & search has 2 tables - contribution and contact
Here are some things I can...When using aggregates in search kit the assumptions about when it is good to offer aggregates is a bit off.
Scenario - contact has a custom field of type money & search has 2 tables - contribution and contact
Here are some things I can't do:
- group by contact ID and then get a SUM of total_amount
- group by contact ID or contribution ID and get a sum of my custom money field
- group by contact ID and also display COUNT for contact id - or display name - this is useful to create a micro widget that gives a count of contacts that meet a criteria & which links to somewhere else.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3678UX: Search Kit and Form Builder should have an "edit" link at the top if you...2023-12-29T02:48:03ZJonGoldUX: Search Kit and Form Builder should have an "edit" link at the top if you have permission to edit themIn Drupal, if you're logged in as an administrator, there's a gear icon at the top of a View when displaying it on a page. "Edit View" is an option. Likewise, the (relatively recent) "Configure Contribution Page" in Civi.
I propose a...In Drupal, if you're logged in as an administrator, there's a gear icon at the top of a View when displaying it on a page. "Edit View" is an option. Likewise, the (relatively recent) "Configure Contribution Page" in Civi.
I propose a similar menu be added to elements embedded in a Form Builder form, as well as a menu for the form itself. Embedded Search Kits should have an "Edit Display" and "Edit Search", and Form Builder forms can have "Edit Form" and "View Submissions".colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3303Front End Event Registration Form - Drop Down Select List Labels not accessible2023-12-28T05:03:24ZndavisFront End Event Registration Form - Drop Down Select List Labels not accessibleOn front end registration forms, when using screen reader software (JAWS etc) When tabbing from a text field into a drop down select list field, the screen reader reads the selected data, not the field label, the way it does with other f...On front end registration forms, when using screen reader software (JAWS etc) When tabbing from a text field into a drop down select list field, the screen reader reads the selected data, not the field label, the way it does with other field types. This is broken. It should read the field label for drop down lists like it does with other field types. The user knows what is selected when they click it and it's read.
To fix this issue, change the aria-labelledby attribute of the s2id_autogen1 id'd input html element from select2-chosen-1 to s2id_autogen1
Code Example for the credit card form at https://demo.circle-interactive.co.uk/civicrm/event/register?id=1&reset=1:
`<label for="s2id_autogen1" class="select2-offscreen">Country</label>
<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-1" id="s2id_autogen1">`
**aria-labelledby="select2-chosen-1"**
needs to be changed to
`<label for="s2id_autogen1" class="select2-offscreen">Country</label>
<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="s2id_autogen1" id="s2id_autogen1">`
**aria-labelledby="s2id_autogen1"**
This change can be extrapolated to state list drop downs (indeed any drop-downs)
For blind users this causes confusion because they don't know what field they're on if they're in a state/province named after the country and it works differently than the rest of the field types.
Changing this in the html source using developer tools of firefox or chrome fixes issue until page is refreshed.
I tried to figure out where this is happening but the javascript spaghetti is very confusing. If anyone can point me to the right file I'll patch it.
thx,
Neil P Davis
Developer
National Federation of the Blindhttps://lab.civicrm.org/dev/core/-/issues/2819Contribution Aggregate by Relationship civireport has deprecation notice abou...2023-12-28T05:03:22ZDaveDContribution Aggregate by Relationship civireport has deprecation notice about formatting non-numeric values`User deprecated function: Formatting non-numeric values is no longer supported: Díaz, Santina Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision in CRM_Core_Error::deprecatedWarning() (line 1060 of /srv/buildkit/build/dmaste...`User deprecated function: Formatting non-numeric values is no longer supported: Díaz, Santina Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision in CRM_Core_Error::deprecatedWarning() (line 1060 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Error.php).`
Repeated many times.
A proper solution maybe involves checking the field data type first but a quick fix is to wrap https://github.com/civicrm/civicrm-core/blob/28878097fa2908956cac2df1f63e7ce32bb85668/CRM/Report/Form/Contribute/History.php#L821 with `if is_numeric($value) {`:
L821: `$value = CRM_Utils_Money::formatLocaleNumericRoundedForDefaultCurrency($value);`
The reason that quickfix isn't enough is because this report will do something like format a postal code 90210 as "90,210.00" if you include that field in the columns, but that pre-dates the deprecation.https://lab.civicrm.org/dev/core/-/issues/2113activity attachments short circuit2023-12-27T05:03:27Zlcdwebactivity attachments short circuitFound a nasty little bug with activity attachments. It appears that when we process activity attachments we short circuit once an empty value is found, and no further attachments are processed. Assuming the default setting allowing 3 max...Found a nasty little bug with activity attachments. It appears that when we process activity attachments we short circuit once an empty value is found, and no further attachments are processed. Assuming the default setting allowing 3 max attachments:
- if the first field has a file, the attachment is uploaded
- if the first field is empty and either the second or third has a file, nothing is uploaded
- if the first and second or first, second, and third field has a file, all are uploaded
I'm still working through the code, but it seems the cycle short circuits once an empty attachment field is hit, and no additional attachments are processed.lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/3223Search > Merge: Not merging correctly with a DOCX file2023-12-27T05:03:25ZswebervnaSearch > Merge: Not merging correctly with a DOCX fileIf I perform an Advanced Search, select "Thank-you letters - print or email":
![image](/uploads/15c884703b5e46196d20feaac5e74be3/image.png)
..chose my options (group by Contact, separator Comma) and run the merge, it's not filling in any...If I perform an Advanced Search, select "Thank-you letters - print or email":
![image](/uploads/15c884703b5e46196d20feaac5e74be3/image.png)
..chose my options (group by Contact, separator Comma) and run the merge, it's not filling in any of my merge codes in the DOCX:
![image](/uploads/93e615c800a296d05bcb6daaa7d036a5/image.png)
1. I triple-checked, all merge codes are typed in exactly as they are in Civi.
2. I even tried using my doc with only a few merge codes, same issue.
3. No difference if I output merge from Civi in DOCX vs PDF.
4. Interestingly, the first time I did the merge everything filled in correctly except for the table at the bottom which groups contributions by "Comma", then all future merges done with this search don't merge correctly at all.
I'm guessing this is a bug with Civi, I tried the same thing on the demo and ran into the same problem with DOCX files.
**Workaround:**
My workaround is to replicate my letter as a Message Template in Civi since the native template works with the fields 100% each time - the downside to this is the limitations of CKEditor4. It's a pain to insert page breaks, center paragraphs, etc, way too basic formatting options.https://lab.civicrm.org/dev/core/-/issues/3219Error when trying to generate thank-you letters for contributions2023-12-26T05:03:26ZswebervnaError when trying to generate thank-you letters for contributionsI'm getting an error "Invalid activity id" when I go to generate thank-you letters based on the search results from my Advanced Search.
I got to Advanced Search, displaying results as Contributions, set all my filters, and then search f...I'm getting an error "Invalid activity id" when I go to generate thank-you letters based on the search results from my Advanced Search.
I got to Advanced Search, displaying results as Contributions, set all my filters, and then search for results. I then select all the results and select the option to make thank-you letters:
![image](/uploads/7871b2abf7e72c092eb1f8eb53e8c681/image.png)
At the next screen, I then choose my message template and click Make Thank-you letters at the bottom, to which I get this error after:
![image](/uploads/be66a1af0e52028de2ccb4b12f63eb93/image.png)
This issue seems to happen regardless of the filters I set for the contribution results, or what's in my message template. It's failing altogether, no matter what, to generate the thank-you letters.
Here's the fatal error description from Civi that my hosting provider gave me:
> $Fatal Error Details = array(3) { ["message"]=> string(19) "Invalid Activity Id" ["code"]=> NULL ["exception"]=> object(CiviCRM_API3_Exception)#2113 (8) { ["extraParams":"CiviCRM_API3_Exception":private]=> array(5) { ["error_code"]=> int(0) ["entity"]=> string(8) "Activity" ["action"]=> string(6) "create" ["is_error"]=> int(1) ["error_message"]=> string(19) "Invalid Activity Id" } ["message":protected]=> string(19) "Invalid Activity Id" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(51) "/var/www/html/sites/all/modules/civicrm/api/api.php" ["line":protected]=> int(133) ["trace":"Exception":private]=> array(15) { [0]=> array(4) { ["file"]=> string(81)
**Things I've tried:**
1. Performing the process on only Individuals, and not all 3 - issue persists.
2. Performing the process on a smaller number of contributions (i.e. 60), issue persists regardless of size.
3. Performing the process without a template - issue persists.
**Similiar Issues:**
1. https://civicrm.stackexchange.com/questions/38540/invalid-currency-error-when-using-custom-template?noredirect=1#comment44099_38540
2. https://lab.civicrm.org/dev/core/-/issues/2344
3. https://github.com/civicrm/civicrm-core/pull/19481https://lab.civicrm.org/dev/core/-/issues/3217[Feature] Please give us the option to disable subtotals for Soft Credit Cont...2023-12-26T05:03:25Zswebervna[Feature] Please give us the option to disable subtotals for Soft Credit Contribution ReportsCurrently, Soft Credit Contribution Reports always output subtotal: ![image](https://lab.civicrm.org/dev/mail/uploads/39254fd8a1be8b42d9889da4230d91d0/image.png)
I think it would be nice to disable this as an option, so we can remove th...Currently, Soft Credit Contribution Reports always output subtotal: ![image](https://lab.civicrm.org/dev/mail/uploads/39254fd8a1be8b42d9889da4230d91d0/image.png)
I think it would be nice to disable this as an option, so we can remove the subtotal if we don't need them.https://lab.civicrm.org/dev/core/-/issues/3216dev/report#53: search on relationship and case (2)2023-12-25T05:03:31Zeileendev/report#53: search on relationship and case (2)Unfortunately we had to revert https://github.com/civicrm/civicrm-core/pull/20002 since it was too complicated to fix the regression it causes in time for the release otherwise
Overview
When doing an advanced search with case parameters...Unfortunately we had to revert https://github.com/civicrm/civicrm-core/pull/20002 since it was too complicated to fix the regression it causes in time for the release otherwise
Overview
When doing an advanced search with case parameters set and displaying related contacts. Gives all clients of all the found cases which have this relationship. What we would expect is that related contact is linked to the found cases.
Steps to reproduce
Preparation:
Create a contact Contact A
Create another contact Contact B
Create a third contact Contact C
Create a case of type Housing Support for Contact A
On the case assign the role Benefit specialist is to Contact B
Create a second case of type Adult day care referral
On the case assign the role Benefit specialist is to Contact C
Searching:
Go to advanced search
Click on View contact as related contact
Select Benefit Specialist as relationship type
Go to tab cases and select Housing Support as case type
Expected results
I expected to see only Contact B as that one has a relationship on the case Housing Support.
Actual results
I see both Contact B and Contact C.
Comments
See also the discussion of a similar related topic: https://lab.civicrm.org/dev/report/-/issues/53jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/3215On changing 'Limit Dashboard Results' count adds duplicate dashlet2023-12-25T05:03:30ZMonish DebOn changing 'Limit Dashboard Results' count adds duplicate dashletSteps to replicate:
1. Go to any existing report instance (say 'Activity Details') >> enable for 'Available for Dashboard' >> Save
2. Then change the 'Limit Dashboard Results' count and save again.
3. Go to homepage, and click on 'A...Steps to replicate:
1. Go to any existing report instance (say 'Activity Details') >> enable for 'Available for Dashboard' >> Save
2. Then change the 'Limit Dashboard Results' count and save again.
3. Go to homepage, and click on 'Available Dashlets'
Result:
You will find two duplicate dashlets has been created with same title. Here's a screencast in dmaster:
![after](/uploads/ff1256639e635a2887033f42b150d2d9/after.gif)Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3213When using Form Builder and "Accessible on front-end of website", how do I di...2023-12-24T05:03:21Zjustinfreeman (Agileware)When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?
I understand that the CiviCRM CSS can be disabled entirely on the website. But I just want to **disable the ...When using Form Builder and "Accessible on front-end of website", how do I disable the CiviCRM styling for this front-end page?
I understand that the CiviCRM CSS can be disabled entirely on the website. But I just want to **disable the CiviCRM styling specifically for one or more Form Builder front-end pages**.https://lab.civicrm.org/dev/core/-/issues/3212Participant Listing report filters incorrectly on role ID2023-12-24T05:03:20ZJonGoldParticipant Listing report filters incorrectly on role IDThis issue is identical to [CRM-18803](https://issues.civicrm.org/jira/browse/CRM-18803) except that CRM-18803 affected all other CiviReports with fields that stored values separated by `CRM_Core_DAO::VALUE_SEPARATOR`. Those were fixed ...This issue is identical to [CRM-18803](https://issues.civicrm.org/jira/browse/CRM-18803) except that CRM-18803 affected all other CiviReports with fields that stored values separated by `CRM_Core_DAO::VALUE_SEPARATOR`. Those were fixed everywhere else by [this PR](https://github.com/civicrm/civicrm-core/pull/8650). However, since the `where()` in this report is overridden, it has its own copy of the regex which wasn't fixed.
I grepped and confirmed this is the only place where this needs to be fixed, and applied the same regex as the commit above.
To replicate this bug, you need at least ten participant roles. The first one's value should be `1`. Searching on this value will return any participant whose role BEGINS with a `1` (i.e. `10`, `11`, `100`, etc.) rather than just records whose participant role value IS 1.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3211Country and State criteria disappear when editing smart group2023-12-23T05:03:23Zm robimorgan@palantetech.coopCountry and State criteria disappear when editing smart groupSteps to replicate:
* Run advanced search with Country + State (I used United States + Texas)
* Create smart group with the results
* View contacts in smart group, select "Edit Smart Group Criteria"
* United States + Texas are not popula...Steps to replicate:
* Run advanced search with Country + State (I used United States + Texas)
* Create smart group with the results
* View contacts in smart group, select "Edit Smart Group Criteria"
* United States + Texas are not populated on the search form.
Notes
* Replicated on wpmaster and dmaster
* Noticed the issue in a Wordpress site on 5.19.4
* The issue is also affecting existing smart groups.
* The groups themselves remain functional.
* Other address and other search criteria are saved. Just the country, and fields that depend on the country to be populated, are cleared.https://lab.civicrm.org/dev/core/-/issues/3210Report Listing improved UX2023-12-23T05:03:22ZJonGoldReport Listing improved UXWhen you go to **Reports menu » X Reports**, where `X` is anything, you get the report listing page (`CRM_Report_Page_InstanceList`). This page hard-codes the order the reports appear in.
* First by component
* Second by the weight o...When you go to **Reports menu » X Reports**, where `X` is anything, you get the report listing page (`CRM_Report_Page_InstanceList`). This page hard-codes the order the reports appear in.
* First by component
* Second by the weight of the report template ID in the `report_template` option value list
* Third alphabetized by title.
The second sort criterium is the problematic one. I propose we sort by component, then alphabetically.
I assume the original thinking was, "Let's keep all the Contribution Summary reports together, all the Contribution Detail reports", etc. However, I think this isn't an ideal UX:
* Users don't know (or care about) the order of report templates in the option value list.
* Reports can be sorted any number of ways: By user, department, workflow - but those are unlikely to map to report templates.
* This is all especially true in an era where there's many report extensions that provide overlapping reports with core (Extended Reports, Reports Plus, Pivot Reports). I think it makes more sense not to sort by report type.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4357Timezone with Drupal 9, CiviCRM entity and Views2023-12-23T00:55:25Z5knotsTimezone with Drupal 9, CiviCRM entity and ViewsOverview
----------------------------------------
We are working with grants, where fields like "money transferred" exist. This field is stored in the database as a "date-only" value (screenshot). However, Drupal interprets the date as a...Overview
----------------------------------------
We are working with grants, where fields like "money transferred" exist. This field is stored in the database as a "date-only" value (screenshot). However, Drupal interprets the date as a datetime field and, presumably, sets the time to 12 noon, but a day before. This leads to inconsistent dates in Drupal Views outputs. Is there a known workaround to avoid this issue? Currently, I have set a fixed 12-hour timezone difference for the View, which works but is not an ideal solution.
Reproduction steps
----------------------------------------
1. Install civicrm entity and enable grants
1. go to Drupal Views and create a new view based on grants.
1. include fields like 'money transferred'
Current behaviour
----------------------------------------
Drupal interprets the date as a **datetime** field.
Both attached screenshots are from the same entry.
![Bildschirmfoto_2023-06-13_um_14.41.49](/uploads/6b7df46f1fdd9354238c4e4e90ce0dec/Bildschirmfoto_2023-06-13_um_14.41.49.png)
![Bildschirmfoto_2023-06-13_um_14.43.32](/uploads/e324ce91d7fe2a48a0ce84c4bb580589/Bildschirmfoto_2023-06-13_um_14.43.32.png)
Expected behaviour
----------------------------------------
Drupal interprets the date as a **date** field.
Environment information
----------------------------------------
D9.5, CiviCRM 5.62, civicrm_entity /latesthttps://lab.civicrm.org/dev/core/-/issues/1055"Soft credits with related Hard credit" and "Both" searches don't work proper...2023-12-22T17:07:18Zfrancescbassas"Soft credits with related Hard credit" and "Both" searches don't work properly when soft credit type is specifiedRecently I was trying to do a search of contacts with contributions with a soft credit type associated and I was not able to. I found the issue related reported by Joanne Chester on the old issue tracker https://issues.civicrm.org/jira/b...Recently I was trying to do a search of contacts with contributions with a soft credit type associated and I was not able to. I found the issue related reported by Joanne Chester on the old issue tracker https://issues.civicrm.org/jira/browse/CRM-20645 and I proceeded to reopened here.
>When selecting Contributions OR Soft Credits? criteria during an advanced search, if you don't specify the type of soft credit then, as expected:
>
> - Selecting Soft credits with related Hard credit gives a list of all contacts with a soft credit and all contacts who gave the soft credits.
> - Selecting Both gives a list of all contacts who have made a contribution and all contacts who have a soft credits. **
>
>However, if you specify a soft credit type before you do the search then selecting either Soft credits with related Hard credit or Both just gives the contacts who have a soft credit of that type (Ie the same results as you get if select Soft Credit only)
>
>This makes it very difficult to get, say, a list of all the contacts who have made a contribution in hnour of someone else. (Which otherwise you could do with two smart groups based on Soft credits with related Hard credit and soft credit only and an include/exclude custom search - BTW shouldn't it be easier to identify that group of people or am I the only person who might want to know that.)
**Related SE questions**
- [Smart Group for Soft Credit Name](https://civicrm.stackexchange.com/questions/18048/smart-group-for-soft-credit-name)
- [How can I create a group of everyone who gave in honor of a specific person?](https://civicrm.stackexchange.com/questions/20467/how-can-i-create-a-group-of-everyone-who-gave-in-honor-of-a-specific-person)
- [How can I identify the hard contributions/contributors that lead to a soft credit?](https://civicrm.stackexchange.com/questions/18811/how-can-i-identify-the-hard-contributions-contributors-that-lead-to-a-soft-credi)https://lab.civicrm.org/dev/core/-/issues/3209Contribution Details Statistics are multiplied under many circumstances2023-12-22T05:03:25ZJonGoldContribution Details Statistics are multiplied under many circumstancesThis bug was previously identified and fixed as core#655, but the fix only addresses the rows and not the statistics.
In addition to contribution detail rows getting multiplied by soft credits, they can be multipled by any one-to-many `...This bug was previously identified and fixed as core#655, but the fix only addresses the rows and not the statistics.
In addition to contribution detail rows getting multiplied by soft credits, they can be multipled by any one-to-many `JOIN` to the contribution table. Soft credits are one example, but it can also be to a contact's multi-record contact field group, or if you pick a field (like "Credit Card Type") that lives in the financial transaction tables ([first reported on SE](https://civicrm.stackexchange.com/a/28791/12) by @KarinG).
Given that the statistics don't concern itself with any data that's not in `civicrm_contribution`, we can replace the flawed (and potentially CPU-intensive) original query with a list of contribution IDs and only use `FROM civicrm_contribution`.JonGoldJonGold