CRM-21831 & dev/report/issues/1 Fix regressions in contribution detail report relating to soft credits #11917
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This fixes 3 regressions in the contribution report, all of which relate to use of soft credits
Before
After
The total amount is shown on the section break
Total amount link is re-instated
Technical Details
Per @mlutfy investigation this line caused the regressions 4b885f8#diff-d355cdb00cea3915a3cf306c6c08f6a6R2314
The reason is that this line was causing the select query to be treated as a group by query when statistics were present. In this report stats were present but there is no group by tab or option (there is an option in the order by to do sections but that is a different concept from a code POV)
At some early point the fact the addStatisticsToSelect was altering the column names to 'group by style' was adapted to, not by fixing the assumption, but by series of hacks in the report code. This PR removes them.
@mlutfy @lcdservices @elgui02 - this takes #11897 fix & extends it to also address the fatal issue. As a recent regression I believe this needs to go into the rc - but it will need a quick turn-around on feedback for that
Comments
I checked to see what would happen in the soft credit rendering if a contact had more than one soft credit from the same contribution. It turned out to be UI blocked.