Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14162

Inconsistencies and test failures with gender, prefix, suffix

    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

            Activity

              People

              • Assignee:
                colemanw Coleman Watts
                Reporter:
                colemanw Coleman Watts
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: