dallasrb / dallasrb-web

The Dallas Ruby Brigade Website
10 stars 14 forks source link

Profile sorting is broken #35

Closed AaronLasseigne closed 11 years ago

AaronLasseigne commented 11 years ago

People appear in the list several times. Pages 2 and 3 are almost entirely the same.

hkarthik commented 11 years ago

So the list was randomized at some point by @itchy but now I'm thinking we should just revert to alphabetical sorting since that's going to be less error prone. I'll get that taken care of this week.

Thanks for bringing it to my attention!

itchy commented 11 years ago

I understand your desire to keep this simple. I would like to see the data to see why this is displaying profiles more than once. I have not been able to duplicate this bug in development. It also does not seem like the epic sort is sorting correctly. The users with bios of about 80 characters should show up first, but that is not happening.

I added a test to make sure that we are pulling distinct users from the database. I will issue a pull request.

I am not fighting to keep this in, just trying to fix the issue. I am concerned at this point it is a data integrity issue. The users might be in the database twice in which case pulling this out wont fix. Let me know if there is something I can do to help fix this. If it is easiest for you to just pull it out, then great.

itchy commented 11 years ago

Ok -- did some more looking and the way we determined sort order allows for multiple users to have the same sort order, so when we add in pagination, it is possible that the same user show up twice, or not at all. In reality this is not a sort_order, but a sort score. I updated ProfileController to sort by sort order and name if you want to stick with it...

hkarthik commented 11 years ago

@AaronLasseigne can you see if this is fixed? @itchy had a fix for it that I merged in.

AaronLasseigne commented 11 years ago

Looks good.