worldcubeassociation.org icon indicating copy to clipboard operation
worldcubeassociation.org copied to clipboard

Correct order of Competitions based on date of round

Open Jambrose777 opened this issue 3 years ago • 1 comments

Describe the bug There are over 114 cases of a competitor competing in 2 different comps during the same time period in the same event. These comps may show up out of order on the Competitor's Results Page. Notably, this can cause someone to have a fake PB(s), See Caleb Trelford. image

Expected behavior These should show up in the correct order that the competitor competes in.

Additional context SELECT a.personId, a.competitionId, b.competitionId FROM ( SELECT r.personId, r.competitionId, r.eventId, c.start_date, c.end_date FROM Results r LEFT JOIN Competitions c ON c.id = r.competitionId GROUP BY r.personId, r.competitionId, r.eventId ) a JOIN ( SELECT r.personId, r.competitionId, r.eventId, c.start_date, c.end_date FROM Results r LEFT JOIN Competitions c ON c.id = r.competitionId GROUP BY r.personId, r.competitionId, r.eventId ) b ON a.personId = b.personId AND a.competitionId <> b.competitionId AND a.eventId = b.eventId AND ((a.start_date <= b.start_date AND a.end_date >= b.start_date) OR (a.start_date <= b.end_date AND a.end_date >= b.end_date)) GROUP BY a.personId, a.competitionId, b.competitionId

Jambrose777 avatar Aug 08 '22 01:08 Jambrose777

This is non-trivial as both competitions happened on the exact same calendar dates. In order to figure this out, we need to tackle the grander scheme of "more fine grained time and date information for comps" in general.

Noted, but not the highest on the priority list right now.

gregorbg avatar Aug 11 '22 08:08 gregorbg

Marked as blocked in light of Gregor's comment above.

dunkOnIT avatar Oct 25 '22 06:10 dunkOnIT