-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Funder and hunter personas in user profile, sync personas to individual mailchimp lists #4481
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4481 +/- ##
==========================================
- Coverage 30.08% 30.07% -0.02%
==========================================
Files 209 211 +2
Lines 16850 16873 +23
Branches 2267 2270 +3
==========================================
+ Hits 5070 5075 +5
- Misses 11582 11600 +18
Partials 198 198
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #4481 +/- ##
==========================================
+ Coverage 30.3% 30.44% +0.13%
==========================================
Files 214 216 +2
Lines 17142 17442 +300
Branches 2319 2362 +43
==========================================
+ Hits 5195 5310 +115
- Misses 11740 11926 +186
+ Partials 207 206 -1
Continue to review full report at Codecov.
|
8b58493
to
0f8db6d
Compare
864b7c5
to
eb089f6
Compare
e3f4e2f
to
f1906e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work on this @danlipert.
- This is the statement that I would revise:
The hunter and funder flags are only set to true for a given user if the SQL query lists the user as active.
I would modify this with the flags are set to true if a funder has ever funded an issue / performed a funder action, and a bounty hunter has ever done work on an issue / performed a bounty hunter action. If we set them to true only if they're active, we miss out on emailing bounty hunters and/or funders who have done something but not in the last 3 months. I'm assuming with how it stands now, "not active funder/bounty hunters" are labeled as users?
I've coded up that broader definition of designation here: https://metabase.gitcoin.co/question/423
- Because this runs on a cron job, I'm seeing the possible path that a user can only become bounty hunter or funder, but never can revert back to just "user" (if we use the logic in the metabase question above). That's also a point of contention if we use "active" set to true - that means bounty hunters and funders could potentially become "users" again if they fall inactive, which we don't want.
Lemme know if these make sense, and if you're able to access that Metabase question.
@frankchen07 Correct, this would only classify you as a given persona if you were active in the last three months. I will change this to use the updated metabase question so that |
@danlipert - also, Alisa made a good point to make sure that the github handles are also in mailchimp, since when we send it out, we'll be using their handle to address them. I'm not sure if it's already in there, but the updated SQL query also has a handle listed. |
a1c423a
to
73a55d0
Compare
@danlipert - sorry caught one small change on metabase yesterday: https://metabase.gitcoin.co/question/423 line 120 - changed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codewise lgtm but could you shed some info on the query ?
might be worth to document it in the file itself ?
Isn't the github handle out of scope for this ticket? It can be added at some point (as a first name, or something else) but I want to make sure this change is in sync with the other related tickets, such as @octavioamu 's. We haven't been capturing this previously in mailchimp. @PixelantDesign @frankchen07 |
83e7cda
to
4000121
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally working fine!!
will get this in as separate PR if needed
Description
This PR adds two additional boolean values to user profiles, whether a user is a bounty hunter, and/or a bounty funder. In addition, a migration is added that sets these flags for each user. The SQL query is used directly to maintain compatibility between the query used here and the query used on Metabase created by @frankchen07 . Also, two endpoints are created to export these lists easily for mailing list purposes. The hunter and funder flags are set daily via cronjob for all users.
The hunter and funder flags are only set to true for a given user if the SQL query lists the user as
active
.The different personas are then synced to 3 new mailchimp audiences on the new mailchimp account: one for funders, one for hunters, and one for everyone.
Refers/Fixes
#4415
Testing
Tested persona assignment locally by applying migration manually and checking the export endpoints. Mailchimp integration tested via unit test.