Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15578 Implement "New Mailing" + "AB Testing" in Angular
  3. CRM-15931

CRM_Mailing_BAO_Mailing::report (and possibly other functions) are mis-categorizing mailing groups due to change in group_type string case

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5, 4.6
    • Fix Version/s: 4.5.7, 4.6
    • Component/s: CiviMail
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      Symptom I noticed is when viewing the CiviMail Mailing Report (click on Report action link from a draft, scheduled or sent mailing) [civicrm/mailing/report?mid=1&reset=1] - the report shows both Included and Excluded groups as "Excluded".

      I narrowed this down to the code snippet below from CRM_Mailing_BAO_Mailing::report - which is expecting group_type = 'Included', 'Excluded' or 'Base'. In my DB, mailing_group.group_type strings are lower case (e.g. 'included', 'excluded'). This causes the if statement to fail.

      There are a few other spots in Mailing_BAO which also expect mixed case and I suspect they are also messing up. I tried to determine where the group_type strings are set - but couldn't find it.

      =======
      /* Rename hidden groups */

      if ($mailing->group_hidden == 1)

      { $row['name'] = "Search Results"; }

      if ($mailing->group_type == 'Include')

      { $report['group']['include'][] = $row; }

      elseif ($mailing->group_type == 'Base')

      { $report['group']['base'][] = $row; }

      else

      { $report['group']['exclude'][] = $row; }

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: