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

Add census submissions to contact rollups #20876

Merged
merged 4 commits into from Feb 27, 2018

Conversation

bencodeorg
Copy link
Contributor

@bencodeorg bencodeorg commented Feb 23, 2018

Tested locally by importing a large volume (~1 million) of pegasus.forms Petition submissions and all census_submissions. Confirmed:

  • counting the number of unique entries in contact_rollups_daily where forms_submitted includes Census aligns with the unique number of entries in census_submissions
  • the number of emails with "Teacher" in roles with a census submission aligns with the number of teachers who submitted the census (according to submitter_role field)
  • emails who filled out both the Census and the Petition (identified via production query) are listed as having filled out both forms.

This PR does not:

  • update the roles_submitted field -- I feel like this needs some broader discussion with the marketing team around what they use.

Outstanding questions:

  • does the "upsert" (ON DUPLICATE KEY in insert_from_dashboard_census_submissions) cover enough fields? I only update the forms_submitted field, as I'm not totally clear what fields are/aren't updated when data is updated from other sources.

Copy link

@jeremydstone jeremydstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bencodeorg
Copy link
Contributor Author

Jeremy suggested offline creating a couple User accounts locally with the same email addresses that appear in census_submissions to make sure that data overwrites/updates work appropriately.

@bencodeorg
Copy link
Contributor Author

Confirmed a Teacher user account who submitted the census form with another role maintains the role Teacher and the forms_submitted = "Census".

@bencodeorg bencodeorg merged commit 33968b6 into staging Feb 27, 2018
@bencodeorg bencodeorg deleted the add-census-submissions-to-contact-rollups branch February 27, 2018 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants