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

Select "Enable multiple bulk email address for a contact", "hold_date" can not be updated

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.10, 4.7.16
    • Fix Version/s: None
    • Component/s: CiviMail
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Steps to reproduce:

      1. Open the page „Administer CiviCRM“ --> “CiviMail Component Settings”, and select the option “Enable multiple bulk email address for a contact” (1_admin_civimail_settings.png)
      2. Open a contact and set “on hold” to the email (i.g. select “On Hold Opt Out”), and check the hold_date with api, ), in my test the “hold_date” is “2017-02-22 09:27:56”, and “on_hold=2 (see the screenshots 2_set_onHold_email.png and 3_check_holddate_1.png)
      3. On the page of contact, reset the “On Hold” and save it, and check the value with api, and the value of “on_hold” is 0, BUT the “hold_date” IS NOT CHANGED! The “hold_date” should be deleted, and set the current time for “reset_date”! (see the screenshots 4_delete_onHold.png and 5_check_holddate_2.png)
      4. As a following error: the “hold_date” is the old one, not changed, if you set “on hold” to the email again (i.g. select “On Hold Bounce”). In my test the “hold_date” is still “2017-02-22 09:27:56”, and “on_hold=1 (see the screenshots 6_check_holddate_3.png)

      To fix: ../sites/all/modules/civicrm/CRM/Core/BAO/Email.php
      public static function holdEmail(&$email) {……
      elseif ($email->on_hold == 'null') {

      SHOULD BE

      elseif ($email->on_hold == 'null'* || empty($email->on_hold*)) {

        Attachments

        1. 1_admin_civimail_settings.png
          76 kB
          Yuliyana Liyana
        2. 2_set_onHold_email.png
          96 kB
          Yuliyana Liyana
        3. 3_check_holddate_1.png
          24 kB
          Yuliyana Liyana
        4. 4_delete_onHold.png
          46 kB
          Yuliyana Liyana
        5. 5_check_holddate_2.png
          27 kB
          Yuliyana Liyana
        6. 6_check_holddate_3.png
          31 kB
          Yuliyana Liyana

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              liyana Yuliyana Liyana
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: