Add upgrade routine to convert on_hold to an array for sites with
authoreileen <emcnaughton@wikimedia.org>
Thu, 28 Feb 2019 21:44:22 +0000 (10:44 +1300)
committereileen <emcnaughton@wikimedia.org>
Sat, 2 Mar 2019 06:30:43 +0000 (19:30 +1300)
commitb4d67eb24a083e0d5f3a7692325a91e949e87099
treedda98099c61149d1a46d3bba91dfe71e394af090
parentb5876030118305a11f75cb005549570c23002ce4
Add upgrade routine to convert on_hold to an array for sites with
civimail_multiple_bulk_emails set.

with that set we get a select box which needs an array rather than a checkbox.

Note from my testing there is problem loading the defaults due to the field name being
wrong - this aligns groups created before & after the 5.9 upgrade but does not resolve that.

    // preferred communication method
    if (Civi::settings()->get('civimail_multiple_bulk_emails')) {
      ->addSelect('email_on_hold',
        array('entity' => 'email', 'multiple' => 'multiple', 'label' => ts('Email On Hold'), 'options' => CRM_Core_PseudoConstant::emailOnHoldOptions()));
    }
    else {
      ->add('advcheckbox', 'email_on_hold', ts('Email On Hold')
CRM/Upgrade/Incremental/SmartGroups.php
CRM/Upgrade/Incremental/php/FiveEleven.php
tests/phpunit/CRM/Upgrade/Incremental/BaseTest.php