-
Notifications
You must be signed in to change notification settings - Fork 21
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
Prevent impossible hours_per_week
to avoid distorted stats
#125
Comments
An alternative that wouldn't involve customizing the logic in BuddyPress XProfiles might be to just not include numbers on the 5ftf side if they are over the threshold (60 sounds good to me). |
🤔 I worry that there are multiple places that pull from that data, so each one would have to be updated, and the logic might not be DRY across them, and future ones might get missed. I think the code to add the warning would be pretty simple, like |
For reference, Josepha lists her hours as 60 per week, and I think we can largely agree that no one would realistically contribute more time to the project than her. So I think 60 is a good cap to use. |
Doh, now I almost want to cap it at Maybe I'll throw in a custom condition which does that only for @josephahaden. Only partially kidding 🐻 |
I should have explicitly stated earlier on this ticket that forcibly changing the values that people have entered into their profiles makes me really uncomfortable, and I'd like to avoid doing that again. |
There are some users who've entered obviously inaccurate
hours_per_week
values, like72
,84
,96
,150
,300
, etcDevs with a sandbox can see examples with:
SELECT * FROM bpmain_bp_xprofile_data where field_id = 29 and value > 40
Maybe some of them are including multiple people from their company? From looking at their profiles, it's also likely that they're counting the hours they work for their company, rather than hours they contributed to WP (see #83).
There's also some obviously fake ones like
2000
,100000
, etc, and also some junk from spam bots like555-555-0199@example.com
and200000000000000000000000000000
Most of them aren't associated with pledges, but they'll clutter the list in #69 with fake data, and will distort stats if/when we start tracking volunteered hours (see #124).
I think we should do these things:
POST
submissions from entering strings like above0
17674961, 17653610, 17671111, 17671049, 16663455, 17573229, 17614682, 17423769, 17607296, 17131322, 17271425, 17276880, 13116230, 17280143, 17072245, 17406892, 17302971, 17175735, 17313771, 17314244, 17315728, 17319534, 15850564, 17358254, 17358376, 17360661, 17368090, 17245081, 17374592, 17377673, 17381029, 17402832, 15765414, 17176008, 17419841, 17423639, 17423940, 17448492, 17452888, 17459742, 17290995, 17463527, 17464167, 17474099, 16705919, 17482922, 17504558, 17502708, 17508094, 17517696, 17523489, 17540046, 17542244, 17542238, 17532010, 17618055, 16565535, 17547846, 6798946, 16619776, 17594852, 17600710, 16696193, 17605382, 17616140, 17630543, 17629519, 17647225, 13791648, 17412167, 14540841, 17655104, 17655888, 17657877, 17660396, 17663322, 17567236, 17569402, 17571235, 16577545, 17579039, 17580277, 17369105, 17631555, 17634691, 17180141, 17684823, 16015760, 17687500, 17688780, 17691401, 17693882, 17698369, 17698868, 17699275, 13961274, 17702143
What do y'all think?
The text was updated successfully, but these errors were encountered: