CRM-20316 - Fix "New Mailing" regression. `subject` should not be required.
authorTim Otten <totten@civicrm.org>
Tue, 2 May 2017 02:01:41 +0000 (19:01 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 2 May 2017 02:07:49 +0000 (19:07 -0700)
When you navigate to "New Mailing" (`civicrm/a/#/mailing/new`) in the UI, it
crashes on a white-screen.  Inspecting the console shows that the call to
`Mailing.create` is failing because `subject` is missing.  But at this point
we're only creating a *draft* mailing -- so you don't have or need a
fully-formed mailing yet.

api/v3/Mailing.php

index ae0a246cf8f0b2610761f75e350b818aa3aa159a..a8ee98d5f8653330d80f663c0ab5dd8b1146b6a6 100644 (file)
@@ -134,7 +134,6 @@ function _civicrm_api3_mailing_gettokens_spec(&$params) {
  */
 function _civicrm_api3_mailing_create_spec(&$params) {
   $params['created_id']['api.default'] = 'user_contact_id';
-  $params['subject']['api.required'] = TRUE;
 
   $params['override_verp']['api.default'] = !CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'track_civimail_replies');
   $params['visibility']['api.default'] = 'Public Pages';