CRM-4597 Advanced Search : Add Preferred Communications Method to search fields

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Users who are targeting contacts for outbound mass communications often need to filter the list by the preferred communication method (e.g. send emails vs. postal mail etc.). The search for this set of checkboxes uses the OR operator - consistent with other sets of checkboxes in Advanced Search.

      Example: If you search by Preferred Comm Method and check Email and Phone - you'll get contacts who have one or the other (or both) preferences checked in their record.

        Attachments

          Activity

          [CRM-4597] Advanced Search : Add Preferred Communications Method to search fields
          David Greenberg added a comment -

          Kurund - This seems to be working properly. However, please check CRM_Contact_BAO_Query::preferredCommunication - the function was already there but needed to be rewritten. The lines from 2630 to 2643 I left as-is - but I don't understand when they'd be called. Seems like $value will always be an array ???

          David Greenberg added a comment -

          Tested this with both Advanced Search and Search Builder - and get correct results.

          NOTE: If you are using sample contacts from civicrm_generated (prior to this commit), the expected custom option VALUE_SEPERATOR is not included in the preferred_communication_method column - so these contacts don't get returned by the search unless they are edited. I've fixed GenerateData.php and rebuilt civicrm_generated.mysql to fix this.

          Kurund Jalmi added a comment -

          Batch move to verification

          Yashodha Chaku added a comment -

          assigning for 3.0 QA

          Yashodha Chaku added a comment -

          assigning for 3.1 verification

            People

            • Assignee:
              Michał Mach
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified