Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.9
-
Fix Version/s: None
-
Component/s: CiviMail, Core CiviCRM
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
API calls to 'Contact' 'create' that have blank values for the 'do_not_email' (and similar) fields create a contact in the database with 'NULL' in those fields, eg:
$result = civicrm_api3('Contact', 'create', array(
'sequential' => 1,
'last_name' => "Foo",
'do_not_email' => "",
'contact_type' => "Individual",
));
Results in do_not_email being NULL
These people then do not receive mailings in CiviMail because the code expects to find a 1 or 0 in these fields, but not NULL.
Proposed solution
(Enforce these fields to be 1 or 0 in the API?)
Enforce 'NOT NULL' on the following fields in the civicrm_contact table:
do_not_email
do_not_phone
do_not_mail
do_not_sms
do_not_trade
As per the current configuration of the is_opt_out field.
Attachments
Issue Links
- supplements
-
CRM-17147 People with empty deceased-flag ('is null') get removed from recipient list of a mailing
- Done/Fixed