Details

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

      Description

      When browsing the list of mailings, one sees both (a) traditional standalone mailings and (b) the constituents of any A/B tests. The user should be directed to a suitable UI when clicking a link for an A/B test mailing.

      It can be fairly complicated to introduce JOINs in our selectors. Instead, we should add a column for "mailing_type" which can differentiate between standalone mailings, A/B tests, and A/B final-winner (and possibly scheduled-reminders and SMS... but that's outside scope).

      (We've gone back and forth a bit on the exact UX. The UX here could theoretically done without the DB change, but some do require DB change, and this is still an opportune time for the DB change.)

      Data Model Changes:

      A1. Add CRM_Mailing_PseudoConstant::mailingType() which returns

      • "standalone" => ts("Standalone")
      • "experiment" => ts("Experimental")
      • "winner" => ts("Winner")
        A2. Add a VARCHAR(32) column, "mailing_type", to "civicrm_mailing" and declare the pseudoconstant..
        A3. Test that the pseudoconstants are correctly configured in XML by calling the getoptions API (e.g. "drush cvapi Mailing.getoptions field=mailing_type" should print out the list of mailing types)
        A4. Upgrade: For pre-existing mailings, fill in "mailing_type" as "standalone."
        A5. Upgrade: For A/B tests created during alpha-cycle, set the "mailing_type" to experimental (A/B) or winner (C).

      Runtime Changes

      B1. Update the Mailing.create API to set the default mailing_type to "standalone". (Note: The "New Mailing" UI will respect the defaults from the API.)
      B2. Update the A/B test UI to set mailing_types of "experiment" (for A+B) and "winner" (for the selection). (See js/angular-crmMailingAB/services.js – look for "mailingDefaults".)
      B3. When processing the "Mailing => Draft => Continue" link ("civicrm/mailing/send" aka "CRM_Mailing_Controller_Send"), check the mailing type and redirect accordingly:

      • For "standalone", redirect to civicrm/a/#/mailing/MAILING_ID
      • For "experiment" or "winner", redirect to civicrm/a/#/abtest/ABTEST_ID
        B4. When processing the "Mailing => Sent => Report" link ("civicrm/mailing/report" aka "CRM_Mailing_Page_Report"), check the mailing type.
      • For "experiment" or "Winner", redirect to civicrm/a/#/abtest/ABTEST_ID
        B5. (MOVED: Merge the compose/review/report screens for A/B tests so that they work with the same URL (i.e. "civicrm/a/#/abtest/ABTEST_ID"). – This is now CRM-15995; PR submitted.)

      (Note: The A/B test goes through different statuses where it may contain a mix of draft and scheduled mailings. With B3+B4+B5, the redirector doesn't need to fully understand these details – the A/B test UI will deal with them.)

        Attachments

          Activity

            People

            • Assignee:
              atif.shaikh Atif Shaikh
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: