Skip to content
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

SearchKit - Prevent errors trying to orderBy nonaggregated columns #23247

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 19, 2022

Overview

SearchKit helpfully adds a default sort order to displays, such as sort_name to Contact searches. This unfortunately breaks when using aggregation.

Before

Tried to do a search with count(contact_id) GROUP BY contact_type - & .... no data

After

Works. Test added.

@civibot
Copy link

civibot bot commented Apr 19, 2022

(Standard links)

@civibot civibot bot added the master label Apr 19, 2022
@colemanw colemanw changed the base branch from master to 5.49 April 19, 2022 21:28
@civibot civibot bot added 5.49 and removed master labels Apr 19, 2022
@eileenmcnaughton
Copy link
Contributor

Worked in a quick r-run

@eileenmcnaughton eileenmcnaughton merged commit a5dfe6e into civicrm:5.49 Apr 20, 2022
@eileenmcnaughton eileenmcnaughton deleted the searchKitAggFix branch April 20, 2022 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants