Skip to content

Added scripts for the 5-2 petition followup mailing.#8162

Merged
aoby merged 4 commits into
stagingfrom
petition-followup-mailing
May 3, 2016
Merged

Added scripts for the 5-2 petition followup mailing.#8162
aoby merged 4 commits into
stagingfrom
petition-followup-mailing

Conversation

@aoby

@aoby aoby commented May 2, 2016

Copy link
Copy Markdown
Contributor

No description provided.

teachers = query_subscribed_contacts(q: teacher_query, fl: fields)
puts "#{teachers.length} total US teachers and past HOC organizers."


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Style/EmptyLines: Extra blank line detected.

@aoby

aoby commented May 3, 2016

Copy link
Copy Markdown
Contributor Author

@ashercodeorg I updated the PR with your suggestions. After consulting with Marketing, i expanded the query to include the experiment emails too. We are sticking with everyone who didn't click through regardless of whether they opened the original email.

I added a test query and manually verified I'd get an error for both conditions: completely faulty url, or a valid but incorrect url (i.e. one used in a previous email campaign).

# Next, filter for those who did not click through any of the previous petition emails (experiments or final).
PREVIOUS_MESSAGE_NAME_PREFIX = '4-22-petition-congress%'
CLICK_THROUGH_URL = 'http://bit.ly/computersciencepetition'
message_id_list = DB[:poste_messages].where(Sequel.like(:name, PREVIOUS_MESSAGE_NAME_PREFIX)).map(:id).join(',')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Long line. Perhaps

message_id_list = DB[:poste_messages].
  where(Sequel.like(:name, PREVIOUS_MESSAGE_NAME_PREFIX)).
  map(:id).
  join(',')

@ashercodeorg

Copy link
Copy Markdown
Contributor

Bunch of nits, overall LGTM. Note that the ci/circleci failure seems to be spurious (a JS error).

@aoby aoby force-pushed the petition-followup-mailing branch from 187056e to 1740a53 Compare May 3, 2016 17:56
@aoby

aoby commented May 3, 2016

Copy link
Copy Markdown
Contributor Author

I updated with your suggestions. The unrelated js error has been fixed in #8163, so I rebased and am running the tests again.

@aoby aoby force-pushed the petition-followup-mailing branch from 1740a53 to 3b3c8d2 Compare May 3, 2016 18:10
@aoby aoby merged commit 5971fb9 into staging May 3, 2016
@aoby aoby deleted the petition-followup-mailing branch May 3, 2016 19:30
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.

3 participants