Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mailing.php is_deceased queries #6013

Merged
merged 1 commit into from
Jun 15, 2015

Conversation

galgeek
Copy link
Contributor

@galgeek galgeek commented Jun 15, 2015

Include contacts where is_deceased is set to null or False (not True) in bulk e-mail lists

Include contacts where is_deceased is set to null or False (not True) in bulk e-mail lists
@civicrm-builder
Copy link

Can one of the admins verify this patch?

@yashodha yashodha added the 4.7 label Jun 15, 2015
yashodha pushed a commit that referenced this pull request Jun 15, 2015
Update Mailing.php is_deceased queries
@yashodha yashodha merged commit 46d035b into civicrm:master Jun 15, 2015
@galgeek galgeek deleted the email_null_is_deceased branch June 15, 2015 17:36
@bhugh
Copy link

bhugh commented Dec 18, 2015

Two observations, just based on experimentation:
#1. The change to is_deceased <> 1 doesn't seem to work for the case where is_deceased is set to NULL (at least, not on my DB installation).

Is seems that you need (is_deceased = 0 OR is_deceased IS NULL).

#2. There are several other things that malfunction based on this same problem, scattered around CiviCRM. I spotted a similar issue in Labels, but more relevant to this problem is that pulling tokens in will fail if the is_deceased is set to NULL. That is because utils/Token.php has the same is_deceased=0 idiom around line 1198:

https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Token.php

I'm wondering if a better solution might not be to somehow check periodically and set all is_deceased to 0 if they are NULL.

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@totten
Copy link
Member

totten commented Dec 18, 2015

jenkins, ok to test

@davecivicrm
Copy link
Contributor

@bhugh Are you aware of recent additional PR which set defaults for these columns to 0 and updated all NULL values to 0 : https://github.com/civicrm/civicrm-core/pull/7386/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants