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

search builder: can't search greeting fields

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.11, 4.5.5, 4.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      we are currently unable to search any of the greeting fields (addressee, email_greeting, postal_greeting) in search builder.

      the problem is here:
      https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Query.php#L2129

      these fields have no special handling and so they are pushed through the restWhere method. at this point they are handled as option group values, which is pretty useless. no one is going to search the addressee field and look for all contacts that have a certain addressee construction option (e.g. first name + last name). if they're searching that field, they are searching the content of the field (which is actually the [greeting]_display field in the DB).

      I propose we add a greetings function to handle these three fields. within that function, we simply change the field name to the _display version and construct the where and qill clauses.

      I can submit a patch. I would just like confirmation from the core team about the proposed change.

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: