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

CRM-21546: Implement unique opens filter for mailing opened report #11401

Merged
merged 2 commits into from
Dec 22, 2017

Conversation

monishdeb
Copy link
Member

@monishdeb monishdeb commented Dec 13, 2017

Overview

This ticket is about adding Yes/No filter called 'Unique Opens' to mailing opened report to list out unique open mailings.


@monishdeb
Copy link
Member Author

ping @lcdservices @colemanw

@monishdeb
Copy link
Member Author

Jenkins test this please

@lcdservices
Copy link
Contributor

lcdservices commented Dec 19, 2017

@Monish this is not working. Here are the issues:

  • when unique opens is selected, the group by statement has too many fields. specifically -- it groups by mailing_event_opened_civireport.id and mailing_event_opened_civireport.time_stamp -- both of which are not contact/email specific, and prevent unique rows (unique in terms of 1 open per contact; not in the mysql sense)
  • if you remove those values from group by and also expose open date, we need to wrap open date with ANY_VALUE in the select statement -- or maybe MIN(), so we return the first timestamp for when the email was opened.

@seamuslee001
Copy link
Contributor

@lcdservices just noting Brian that ANY_VALUE isn't really a proper solution given that MariaDB doesn't support ANY_VALUE

@lcdservices
Copy link
Contributor

@seamuslee001 there are some utility functions that take that into consideration. But in this case, I actually think we want MIN() so we get the first time the email was opened.

@monishdeb
Copy link
Member Author

@lcdservices @seamuslee001 I have updated the PR and this is the last commit 6bd27fc

Note that I have kept ANY_VALUE and this won't get added for MariaDB because of CRM_Utils_SQL::disableFullGroupByMode()

@lcdservices
Copy link
Contributor

@monishdeb this is working. no group by errors and the report correctly groups by contact ID when the unique opens filter is selected.

@colemanw
Copy link
Member

@colemanw colemanw merged commit 6029fd7 into civicrm:master Dec 22, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21546: Implement unique opens filter for mailing opened report
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.

5 participants