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

APIv4 - Support pseudoconstant suffixes in orderBy clause #17482

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 3, 2020

Overview

Allows results from API get to be ordered by a suffix e.g. activity_type_id:label. Works for DAO entities as well as basic entities. Exposed to the API explorer.

Before

Could only order by field value, which would appear out of order when viewing the label.

After

Can order by label, name, color, etc.

Technical Details

Pseudoconstant substitution happens through the magic of MySql FIELD() function.

@civibot civibot bot added the master label Jun 3, 2020
@civibot
Copy link

civibot bot commented Jun 3, 2020

(Standard links)

@eileenmcnaughton eileenmcnaughton merged commit bc040f2 into civicrm:master Jun 4, 2020
@eileenmcnaughton eileenmcnaughton deleted the orderBySuffix branch June 4, 2020 01:02
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