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

Participants tab isn't showing the correct numbers. #7051

Closed
frankchen07 opened this issue Jul 3, 2020 · 3 comments · Fixed by #7071
Closed

Participants tab isn't showing the correct numbers. #7051

frankchen07 opened this issue Jul 3, 2020 · 3 comments · Fixed by #7071
Labels
bug This is something that isn't working as intended. Gitcoin Hackathon Gitcoin Hackathon

Comments

@frankchen07
Copy link
Contributor

Describe the bug

The participants tab on a hackathon's page is not displaying the correct number of participants

To Reproduce

  1. go to any hackathon prize explorer view and look at the participants tab with the number after it

Screen Shot 2020-07-01 at 11 31 59

  1. compare to metabase registrant numbers

Screen Shot 2020-07-02 at 23 51 02

Expected behavior

registrants and participants counts should match

@frankchen07 frankchen07 added bug This is something that isn't working as intended. Gitcoin Hackathon Gitcoin Hackathon labels Jul 3, 2020
@walidmujahid
Copy link
Contributor

Where is the metabase number coming from? Or perhaps: what do mean by 'metabase'?

Currently, the hacker_count for the page is the counting all HackathonRegistration instances. After tests in my local docker build, I believe I have identified a design oversight in the hackathon_registration endpoint connected to the onboarding page. When "Join Now" is pressed on the onboarding, a user can continue pressing the button from the frontend and the hackathon_registration endpoint will continue creating duplicate HackathonRegistration instances.

Now, the most straightforward solution to this probelm that I can think of is to just use whatever queryset or method that the metabase number uses.

However, correcting the hackathon_registration endpoint design flaw by adding some validation would also solve this problem and should be done anyway in my opinion -as a separate issue although it may be connected to this current issue. Furthermore, changing the query for hacker_count for the hackathon page so that it ensures dinstinct users per hackathon event could be of benefit.

@frankchen07
Copy link
Contributor Author

the metabase number is just counting distinct profile_ids that have completed the registration.

It could be that the participants number is just creating duplicate hackathon_registration instances, and that is being counted more than once. It seems to make sense because the participants number is higher than the metabase number.

in our case metabase = psql database that I'm working off of.

@walidmujahid
Copy link
Contributor

walidmujahid commented Jul 7, 2020

the metabase number is just counting distinct profile_ids that have completed the registration.

It could be that the participants number is just creating duplicate hackathon_registration instances, and that is being counted more than once. It seems to make sense because the participants number is higher than the metabase number.

in our case metabase = psql database that I'm working off of.

Okay. I believe thet counting distinct registrants should solve this problem. Tested locally. PR opened: #7071

I opened another issue for the duplicate HackathonRegisteration instances: #7070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is something that isn't working as intended. Gitcoin Hackathon Gitcoin Hackathon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants