-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#651 Fix group by on export soft credits (possible recent regression, clearly wrong). #13536
Conversation
(Standard links)
|
7f8d8ee
to
668b4b2
Compare
unrelated fails |
@eileenmcnaughton Who reported this? If they can test it and comment here we can merge. It's obviously correctly from looking at the code but I won't be able to test for a couple of days and don't currently have a database with suitable data |
@@ -157,7 +157,7 @@ public static function getGroupBy($processor, $returnProperties, $query) { | |||
$groupBy = "civicrm_activity.id "; | |||
} | |||
|
|||
return $groupBy ? ' GROUP BY ' . $groupBy : ''; | |||
return $groupBy ? ' GROUP BY ' . implode(', ', (array) $groupBy) : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton can we set $groupBy = NULL at L127 and then:
return !$groupBy ? '' : ' GROUP BY ' . implode(', ', (array) $groupBy);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monishdb I don't think that is any different? I just changed it to null since it seems a little cleaner but it still evaluates to FALSE either way.
The return line is just the same thing re-ordered?
…ression, clearly wrong). As pointed out by the reporter the group by is being calculated as if it were a string but it's an array, this fixes. This code has been touched recently so it might be a recent regression. 5.10 is the first release in a long time where export is working in some mysql / output configs after a big refactor to get rid of wide temp tables
668b4b2
to
d5148d7
Compare
@mattwire I kinda feel like they DID test it since they proposed the change pretty close to the way I've rendered it |
Tested, working fine. Also checked with other exports just in case. Test failure is unrelated. |
Overview
Fix for exporting contribution search results not grouping soft credits correctly
In my test I used this search
and this mapping
Before
only 3 rows exported - grouped across scredits
After
mo better rows
Technical Details
As pointed out by the reporter the group by is being calculated as if it were a string but it's an array, this fixes.
This code has been touched recently so it might be a recent regression. 5.10 is the first release in a long time where
export is working in some mysql / output configs after a big refactor to get rid of wide temp tables
Comments