Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.3
-
Fix Version/s: 4.4.4
-
Component/s: None
-
Labels:None
Description
Here's the problem as I understand it. The contact query object has always been treating gender, prefix & suffix in a nonstandard way, but prior to 4.4 it was relatively consistent about it. It would always return:
gender => string
gender_id => int
individual_prefix => string
prefix_id => int
individual_suffix => string
suffix_id => int
It's still doing that but the problem is that in 4.4 some cleanup/standardization happened in various places so that different components are wanting different things.
API: wants it the old way
Advanced search: wants it the old way
Search builder: wants translated field labels instead of ids
Advanced search with profile views: wants translated field labels instead of ids
So we have some push me/pull me going on with trying to get it right. This commit fixed the forms but broke the api: https://github.com/civicrm/civicrm-core/commit/e30e8c So it probably should be reverted and back to the drawing board.
I think the /right/ fix would be to make advanced search behave like the other two searches (profile view and search builder) so that all 3 are failing consistently. That would mean renaming the search fields in the adv search form to their proper db names (which would break saved searches, requiring an upgrade script). Then convert them all to do the pseudoconstant substitution during rendering rather than depending on the query object to do it for them. But I haven't been able to find where that rendering takes place.
Attachments
Issue Links
- supplements
-
CRM-13996 Advanced Search; Sorting of Results displayed in a custom profile fails and Advanced Search must be reset
-
- Done/Fixed
-