CRM-13955 mailing creation: illogical defaults, etc.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.3
    • Fix Version/s: 4.4.4
    • Component/s: CiviMail
    • Labels:
      None

      Description

      while diagnosing some oddities with how mailings were being handled at various steps, I started to realize that we're setting some values during the mailing construction that we really shouldn't be. for example – our set of default values when first creating the mailing record include setting the scheduled and approver ids and dates. that makes no sense – why would we set a scheduled date before the user even gets to that step in the wizard?

      some of this is later corrected by some of the conditional logic that follows. but the whole CRM_Mailing_BAO_Mailing::create() method (which is called at every step in the wizard) needs to be reviewed and cleaned up.

        Attachments

          Activity

          [CRM-13955] mailing creation: illogical defaults, etc.
          Brian Shaughnessy added a comment -

          https://github.com/civicrm/civicrm-core/pull/2199

          This PR does a few things.

          1) as described in the description, we fix the default values for initial mailing construction to remove some values that should not have been set.

          2) we alter the conditions upon which the parent mailing job is constructed – namely, it is created at the point the mailing is scheduled.

          3) we fix a few places where values are reset to NULL. they were previously getting set to the string value null

          4) we add the mailing ID to the form object after its created. this is important for hook implementations

          Brian Shaughnessy added a comment -

          I made a second commit to the PR reverting 3) above. we need the string value null to set it properly in the DB. the condition upon which we create the parent job was then updated to reflect this.

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              Brian Shaughnessy

              Dates

              • Created:
                Updated:
                Resolved: